From: Pavel Rochnyack Date: Sat, 23 Nov 2019 14:54:50 +0000 (+0700) Subject: daemon: Fix regression caused by #3217 X-Git-Tag: collectd-5.11.0~54^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3349%2Fhead;p=thirdparty%2Fcollectd.git daemon: Fix regression caused by #3217 Empty section can be used to autoload plugin, which does not supports configuration callback. --- diff --git a/src/daemon/configfile.c b/src/daemon/configfile.c index 3a7364edb..61fa9013f 100644 --- a/src/daemon/configfile.c +++ b/src/daemon/configfile.c @@ -404,6 +404,10 @@ static int dispatch_block_plugin(oconfig_item_t *ci) { } } + /* Try to be backward-compatible with previous versions */ + if (ci->children_num == 0) + return 0; + /* Hm, no complex plugin found. Dispatch the values one by one */ cf_callback_t *cf_cb = cf_search(plugin_name); if (cf_cb == NULL) {