Code

Added option to invert search results
[nagiosplug.git] / lib / parse_ini.c
index c19952dbb6343dd3efaa6191bd04a8b9c5b5373a..004396fe803378c18c501bb17743364b8cb6508b 100644 (file)
@@ -5,9 +5,6 @@
 * License: GPL
 * Copyright (c) 2007 Nagios Plugins Development Team
 * 
-* Last Modified: $Date$
-* 
-* 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
@@ -21,7 +18,6 @@
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
-* $Id$
 * 
 *****************************************************************************/
 
@@ -79,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]));
        }