[svn-commits] qwell: trunk r104093 - in /trunk: ./ main/config.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Feb 25 14:50:57 CST 2008


Author: qwell
Date: Mon Feb 25 14:50:57 2008
New Revision: 104093

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104093
Log:
Merged revisions 104092 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104092 | qwell | 2008-02-25 14:49:42 -0600 (Mon, 25 Feb 2008) | 11 lines

Allow the use of #include and #exec in situations where the max include depth was only 1.
Specifically, this fixes using #include and #exec in extconfig.conf.

This was basically caused because the config file itself raises the include level to 1.

I opted not to raise the include limit, because recursion here could cause very bizarre behavior.

Pointed out, and tested by jmls

(closes issue #12064)

........

Modified:
    trunk/   (props changed)
    trunk/main/config.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?view=diff&rev=104093&r1=104092&r2=104093
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Mon Feb 25 14:50:57 2008
@@ -1963,7 +1963,8 @@
 	struct ast_config_engine *loader = &text_file_engine;
 	struct ast_config *result; 
 
-	if (cfg->include_level == cfg->max_include_level) {
+	/* The config file itself bumps include_level by 1 */
+	if (cfg->max_include_level > 0 && cfg->include_level == cfg->max_include_level + 1) {
 		ast_log(LOG_WARNING, "Maximum Include level (%d) exceeded\n", cfg->max_include_level);
 		return NULL;
 	}




More information about the svn-commits mailing list