diff options
author | Jason Parker <jparker@digium.com> | 2008-02-25 20:50:57 +0000 |
---|---|---|
committer | Jason Parker <jparker@digium.com> | 2008-02-25 20:50:57 +0000 |
commit | 84e302bfe0ea33324dcd1a6d55a1a8ab50ac7672 (patch) | |
tree | 6e9840e42ee6a291d6be29409309d858f135f890 /main | |
parent | 581c8c7bf2ff427c5096a1b16505a730c4928c44 (diff) |
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)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/config.c b/main/config.c index bedaa80dd..055b63adb 100644 --- a/main/config.c +++ b/main/config.c @@ -1963,7 +1963,8 @@ struct ast_config *ast_config_internal_load(const char *filename, struct ast_con 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; } |