From d2c40f1d7bea102065733d30bba4c9b30db23ab7 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 15 Jul 2009 10:09:48 +0200 Subject: [PATCH] src/configfile.c: Warn if an unexpected block is found. If the `snmp' plugin isn't loaded (but a configuration exists), no warning is printed because there are only blocks in the SNMP configuration.. --- src/configfile.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/configfile.c b/src/configfile.c index 0bb46e40..4ebd6200 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -336,7 +336,15 @@ static int dispatch_block_plugin (oconfig_item_t *ci) if (ci->children[i].children == NULL) dispatch_value_plugin (name, ci->children + i); else - {DEBUG ("No nested config blocks allowed for this plugin.");} + { + WARNING ("There is a `%s' block within the " + "configuration for the %s plugin. " + "The plugin either only expects " + "\"simple\" configuration statements " + "or wasn't loaded using `LoadPlugin'." + " Please check your configuration.", + ci->children[i].key, name); + } } return (0); -- 2.11.0