X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fipmi.c;h=67fd949cba815c7ba3d83a9cbbb6af4b45eed815;hb=9ef2b3d68717ea7074c77c287400c578766f50ba;hp=2475278a2eef8367ec51baf823271fd6d47c4bec;hpb=7b0628b4f4688d48d89f94ca381ca6340da05b37;p=collectd.git diff --git a/src/ipmi.c b/src/ipmi.c index 2475278a..67fd949c 100644 --- a/src/ipmi.c +++ b/src/ipmi.c @@ -95,8 +95,8 @@ typedef struct c_ipmi_db_type_map_s c_ipmi_db_type_map_t; /* * Module global variables */ -static os_handler_t *os_handler = NULL; -static c_ipmi_instance_t *instances = NULL; +static os_handler_t *os_handler; +static c_ipmi_instance_t *instances; /* * Misc private functions @@ -1062,9 +1062,14 @@ static int c_ipmi_config_add_instance(oconfig_item_t *ci) { for (int i = 0; i < ci->children_num; i++) { oconfig_item_t *child = ci->children + i; - if (strcasecmp("Sensor", child->key) == 0) - ignorelist_add(st->ignorelist, child->values[0].value.string); - else if (strcasecmp("IgnoreSelected", child->key) == 0) { + if (strcasecmp("Sensor", child->key) == 0) { + char *value = NULL; + status = cf_util_get_string(child, &value); + if (status != 0) + break; + ignorelist_add(st->ignorelist, value); + sfree(value); + } else if (strcasecmp("IgnoreSelected", child->key) == 0) { bool t; status = cf_util_get_boolean(child, &t); if (status != 0)