]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
check for CONFIG_STATUS_FILE_INVALID when loading the res_fax config file
authorMatthew Nicholson <mnicholson@digium.com>
Thu, 28 Jul 2011 15:26:56 +0000 (15:26 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Thu, 28 Jul 2011 15:26:56 +0000 (15:26 +0000)
Patch by: tzafrir
Reported by: tzafrir
(closes issue ASTERISK-18161)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@329991 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_fax.c

index 272c709af2ca7cb726b30a72b6b48a79af0d2f66..933f980fc77280a139e17289299bf50ce6f04981 100644 (file)
@@ -2613,6 +2613,12 @@ static int set_config(const char *config_file)
                ast_log(LOG_NOTICE, "Configuration file '%s' not found, using default options.\n", config_file);
                return 0;
        }
+
+       if (cfg == CONFIG_STATUS_FILEINVALID) {
+               ast_log(LOG_NOTICE, "Configuration file '%s' is invalid, using default options.\n", config_file);
+               return 0;
+       }
+
        if (cfg == CONFIG_STATUS_FILEUNCHANGED) {
                ast_clear_flag(&config_flags, CONFIG_FLAG_FILEUNCHANGED);
                cfg = ast_config_load2(config_file, "res_fax", config_flags);