From: Florian Forster Date: Mon, 18 Aug 2014 07:33:29 +0000 (+0200) Subject: Merge branch 'collectd-4.10' into collectd-5.3 X-Git-Tag: collectd-5.3.2~53 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=96e0f2341bace029acefe0a88bab96ae326c0ff5;p=collectd.git Merge branch 'collectd-4.10' into collectd-5.3 --- 96e0f2341bace029acefe0a88bab96ae326c0ff5 diff --cc configure.in index 84d017a4,5dac5431..b00df81a --- a/configure.in +++ b/configure.in @@@ -4329,10 -3748,10 +4329,10 @@@ the then with_libxml2="yes" else - with_libxml2="no (pkg-config doesn't know library)" + with_libxml2="no (pkg-config doesn't know libxml-2.0)" fi - pkg-config --exists libvirt 2>/dev/null + $PKG_CONFIG --exists libvirt 2>/dev/null if test "$?" = "0" then with_libvirt="yes" diff --cc src/configfile.c index 154c041c,983d9956..7e06baa2 --- a/src/configfile.c +++ b/src/configfile.c @@@ -572,25 -515,13 +578,26 @@@ static int cf_include_all (oconfig_item continue; } - new = cf_read_generic (old->values[0].value.string, depth + 1); + for (j = 0; j < old->children_num; ++j) + { + oconfig_item_t *child = old->children + j; + + if (strcasecmp (child->key, "Filter") == 0) + cf_util_get_string (child, &pattern); + else + ERROR ("configfile: Option `%s' not allowed in block.", + child->key); + } + + new = cf_read_generic (old->values[0].value.string, pattern, depth + 1); + sfree (pattern); + if (new == NULL) - continue; + return (-1); /* Now replace the i'th child in `root' with `new'. */ - cf_ci_replace_child (root, new, i); + if (cf_ci_replace_child (root, new, i) < 0) + return (-1); /* ... and go back to the new i'th child. */ --i; diff --cc src/curl_xml.c index 356219a2,28b2ded0..7ca9831f --- a/src/curl_xml.c +++ b/src/curl_xml.c @@@ -383,9 -342,9 +383,9 @@@ static int cx_handle_instance_xpath (xm memset (vl->type_instance, 0, sizeof (vl->type_instance)); /* If the base xpath returns more than one block, the result is assumed to be - * a table. The `Instnce' option is not optional in this case. Check for the + * a table. The `Instance' option is not optional in this case. Check for the * condition and inform the user. */ - if (is_table && (vl->type_instance == NULL)) + if (is_table) { WARNING ("curl_xml plugin: " "Base-XPath %s is a table (more than one result was returned), "