From 485f306868fa9c89b4f09e3b2b813d93ec64f0b4 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Thu, 22 Jan 2009 02:24:39 -0500 Subject: Return UNKNOWN if none of the default files can be found. It makes no sense to return unknown if an implicit section is not found, but go on if the file is missing --- lib/parse_ini.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/parse_ini.c') diff --git a/lib/parse_ini.c b/lib/parse_ini.c index 1d64a506..004396fe 100644 --- a/lib/parse_ini.c +++ b/lib/parse_ini.c @@ -75,6 +75,9 @@ static void parse_locator(const char *locator, const char *def_stanza, np_ini_in /* if there is no @file part */ if(stanza_len==locator_len){ i->file=default_file(); + if(strcmp(i->file, "") == 0){ + die(STATE_UNKNOWN, _("Cannot find '%s' or '%s' in any standard location.\n"), NP_DEFAULT_INI_FILENAME1, NP_DEFAULT_INI_FILENAME2); + } } else { i->file=strdup(&(locator[stanza_len+1])); } -- cgit v1.2.3-74-g34f1