From 0976eb7abb1c17134ad82ed7ac8d07f4000ce174 Mon Sep 17 00:00:00 2001 From: Pavel Rochnyack Date: Sat, 23 Nov 2019 21:54:50 +0700 Subject: [PATCH] daemon: Fix regression caused by #3217 Empty section can be used to autoload plugin, which does not supports configuration callback. --- src/daemon/configfile.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.11.0