Skip to content

Commit

Permalink
Merge pull request networkupstools#50 from jimklimov/grdf-fty
Browse files Browse the repository at this point in the history
drivers/snmp-ups.c : bump the version for public-release driver fix
  • Loading branch information
aquette authored Feb 28, 2018
2 parents 2dc9ff5 + e8ea953 commit 4bf2631
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions drivers/snmp-ups.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const char *mibvers;
#else
# define DRIVER_NAME "Generic SNMP UPS driver"
#endif /* WITH_DMFMIB */
#define DRIVER_VERSION "1.04"
#define DRIVER_VERSION "1.05"

/* driver description structure */
upsdrv_info_t upsdrv_info = {
Expand Down Expand Up @@ -1753,8 +1753,8 @@ void free_info(snmp_info_t *su_info_p)
* the MIB, based on a test using a template OID */
int base_snmp_template_index(const snmp_info_t *su_info_p)
{
if (!su_info_p)
return -1;
if (!su_info_p)
return -1;

int base_index = -1;
char test_OID[SU_INFOSIZE];
Expand Down Expand Up @@ -2224,23 +2224,23 @@ bool_t daisychain_init()
dstate_setinfo("device.model", "daisychain (1+%ld)", devices_count - 1);
}
}
}
}
else {
daisychain_enabled = FALSE;
upsdebugx(1, "No device.count entry found, daisychain support not needed");
}

/* Finally, compute and store the base OID index and NUT offset */
su_info_p = su_find_info("device.model");
if (su_info_p != NULL) {
device_template_index_base = base_snmp_template_index(su_info_p);
upsdebugx(1, "%s: device_template_index_base = %i", __func__, device_template_index_base);
device_template_offset = device_template_index_base - 1;
upsdebugx(1, "%s: device_template_offset = %i", __func__, device_template_offset);
}
else {
upsdebugx(1, "%s: No device.model entry found.", __func__);
}
/* Finally, compute and store the base OID index and NUT offset */
su_info_p = su_find_info("device.model");
if (su_info_p != NULL) {
device_template_index_base = base_snmp_template_index(su_info_p);
upsdebugx(1, "%s: device_template_index_base = %i", __func__, device_template_index_base);
device_template_offset = device_template_index_base - 1;
upsdebugx(1, "%s: device_template_offset = %i", __func__, device_template_offset);
}
else {
upsdebugx(1, "%s: No device.model entry found.", __func__);
}

return daisychain_enabled;
}
Expand Down

0 comments on commit 4bf2631

Please sign in to comment.