From: Florian Forster Date: Thu, 18 Jun 2015 11:05:14 +0000 (+0200) Subject: Merge branch 'collectd-5.4' into collectd-5.5 X-Git-Tag: collectd-5.5.1~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b;p=thirdparty%2Fcollectd.git Merge branch 'collectd-5.4' into collectd-5.5 --- 09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b diff --cc src/snmp.c index cb2bb36d7,3dd08e4ad..7e40392c4 --- a/src/snmp.c +++ b/src/snmp.c @@@ -402,12 -402,11 +402,11 @@@ static int csnmp_config_add_data (oconf for (i = 0; i < ci->children_num; i++) { oconfig_item_t *option = ci->children + i; - status = 0; if (strcasecmp ("Type", option->key) == 0) - status = csnmp_config_add_data_type (dd, option); + status = cf_util_get_string(option, &dd->type); else if (strcasecmp ("Table", option->key) == 0) - status = csnmp_config_add_data_table (dd, option); + status = cf_util_get_boolean(option, &dd->is_table); else if (strcasecmp ("Instance", option->key) == 0) status = csnmp_config_add_data_instance (dd, option); else if (strcasecmp ("InstancePrefix", option->key) == 0) diff --cc src/tail.c index 9ae4139ad,5b9dc5398..e5f24d112 --- a/src/tail.c +++ b/src/tail.c @@@ -221,10 -209,8 +221,9 @@@ static int ctail_config_add_match (cu_t static int ctail_config_add_file (oconfig_item_t *ci) { cu_tail_match_t *tm; + cdtime_t interval = 0; char *plugin_instance = NULL; int num_matches = 0; - int status; int i; if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING)) @@@ -244,15 -230,11 +243,15 @@@ for (i = 0; i < ci->children_num; i++) { oconfig_item_t *option = ci->children + i; + int status; - if (strcasecmp ("Match", option->key) == 0) + if (strcasecmp ("Instance", option->key) == 0) + status = cf_util_get_string (option, &plugin_instance); + else if (strcasecmp ("Interval", option->key) == 0) + cf_util_get_cdtime (option, &interval); + else if (strcasecmp ("Match", option->key) == 0) { - status = ctail_config_add_match (tm, plugin_instance, option); + status = ctail_config_add_match (tm, plugin_instance, option, interval); if (status == 0) num_matches++; /* Be mild with failed matches.. */