[asterisk-commits] bweschke: trunk r151246 - in /trunk: main/config.c pbx/pbx_config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 20 00:07:25 CDT 2008


Author: bweschke
Date: Mon Oct 20 00:07:25 2008
New Revision: 151246

URL: http://svn.digium.com/view/asterisk?view=rev&rev=151246
Log:
 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)
 

Modified:
    trunk/main/config.c
    trunk/pbx/pbx_config.c

Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?view=diff&rev=151246&r1=151245&r2=151246
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Mon Oct 20 00:07:25 2008
@@ -2050,9 +2050,9 @@
 
 	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;

Modified: trunk/pbx/pbx_config.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_config.c?view=diff&rev=151246&r1=151245&r2=151246
==============================================================================
--- trunk/pbx/pbx_config.c (original)
+++ trunk/pbx/pbx_config.c Mon Oct 20 00:07:25 2008
@@ -1412,7 +1412,7 @@
 	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 */




More information about the asterisk-commits mailing list