From: Pavel Rochnyack Date: Sat, 23 Nov 2019 14:54:50 +0000 (+0700) Subject: daemon: Fix regression caused by #3217 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0976eb7abb1c17134ad82ed7ac8d07f4000ce174;p=collectd.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 3a7364ed..61fa9013 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) {