Do NOT attempt to do anything with the ast_config struct when it's been returned as INVALID by the config file interpreter.

(closes issue #13741)
 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
BJ Weschke 2008-10-20 05:07:25 +00:00
parent 21592959cf
commit 9aefadd7c1
2 changed files with 3 additions and 3 deletions

View File

@ -2050,9 +2050,9 @@ struct ast_config *ast_config_internal_load(const char *filename, struct ast_con
result = loader->load_func(db, table, filename, cfg, flags, suggested_include_file, who_asked);
if (result && result != CONFIG_STATUS_FILEUNCHANGED)
if (result && result != CONFIG_STATUS_FILEINVALID && result != CONFIG_STATUS_FILEUNCHANGED)
result->include_level--;
else
else if (result != CONFIG_STATUS_FILEINVALID)
cfg->include_level--;
return result;

View File

@ -1412,7 +1412,7 @@ static int pbx_load_config(const char *config_file)
struct ast_flags config_flags = { 0 };
char lastextension[256];
cfg = ast_config_load(config_file, config_flags);
if (!cfg)
if (!cfg || cfg == CONFIG_STATUS_FILEINVALID)
return 0;
/* Use existing config to populate the PBX table */