X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2Fconfigfile.c;h=c500d3eeb1ffecd46c03056075b807967aa5a0b9;hb=42a30efe33c4d16276589e0dd1f9e135b38e054d;hp=8bf6b8d7e69a92e62521cd3618b1938c7635c2eb;hpb=839dbf244f96d08c02d18e1fc64264b1740e6fc6;p=collectd.git diff --git a/src/daemon/configfile.c b/src/daemon/configfile.c index 8bf6b8d7..c500d3ee 100644 --- a/src/daemon/configfile.c +++ b/src/daemon/configfile.c @@ -411,10 +411,14 @@ static int dispatch_block_plugin(oconfig_item_t *ci) { } /* Hm, no complex plugin found. Dispatch the values one by one */ - for (int i = 0; i < ci->children_num; i++) { - if (ci->children[i].children == NULL) - dispatch_value_plugin(name, ci->children + i); - else { + for (int i = 0, ret = 0; i < ci->children_num; i++) { + if (ci->children[i].children == NULL) { + ret = dispatch_value_plugin(name, ci->children + i); + if (ret != 0) { + ERROR("dispatch for plugin %s returned non-zero code : %i", name, ret); + return ret; + } + } else { WARNING("There is a `%s' block within the " "configuration for the %s plugin. " "The plugin either only expects "