X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2Fconfigfile.c;h=b9860bd9b96878534b5ec5849914f47a0ba0f574;hb=d3ca6fecf93f7c0cf32f38e02f66ce238dbf96b6;hp=93e90e3b14442199f3600547d5084beef065a83c;hpb=1737d01e6d25487852d0da2e45088e11115e52a9;p=collectd.git diff --git a/src/daemon/configfile.c b/src/daemon/configfile.c index 93e90e3b..b9860bd9 100644 --- a/src/daemon/configfile.c +++ b/src/daemon/configfile.c @@ -939,11 +939,14 @@ int global_option_set (const char *option, const char *value, _Bool from_cli) break; if (i >= cf_global_options_num) + { + ERROR ("configfile: Cannot set unknown global option `%s'.", option); return (-1); + } if (cf_global_options[i].from_cli && (! from_cli)) { - DEBUG ("Configfile: Ignoring %s `%s' option because " + DEBUG ("configfile: Ignoring %s `%s' option because " "it was overriden by a command-line option.", option, value); return (0); @@ -970,7 +973,10 @@ const char *global_option_get (const char *option) break; if (i >= cf_global_options_num) + { + ERROR ("configfile: Cannot get unknown global option `%s'.", option); return (NULL); + } return ((cf_global_options[i].value != NULL) ? cf_global_options[i].value