X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fconfigfile.c;h=735be83dd19bf9481ade811db2870efd69c83dea;hb=c4439c9cb3e2348ad7013644731de27a55eca478;hp=8bf6b8d7e69a92e62521cd3618b1938c7635c2eb;hpb=87f8f66a84e78fd37dd2767c032ce74924d31dfd;p=collectd.git diff --git a/src/daemon/configfile.c b/src/daemon/configfile.c index 8bf6b8d7..735be83d 100644 --- a/src/daemon/configfile.c +++ b/src/daemon/configfile.c @@ -411,10 +411,12 @@ 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) + return ret; + } else { WARNING("There is a `%s' block within the " "configuration for the %s plugin. " "The plugin either only expects "