From e707a89e63f2035a1e47d23ac732e16e05cbce85 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Sun, 3 Aug 2003 18:33:50 +0000 Subject: Allow globals in extensions.conf to reference previous variables git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1255 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- pbx/pbx_config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pbx') diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 844386354..eb73c5b29 100755 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -1538,6 +1538,7 @@ static int pbx_load_module(void) char *cxt, *ext, *pri, *appl, *data, *tc, *cidmatch; struct ast_context *con; char *start, *end; + char realvalue[256] = ""; cfg = ast_load(config); if (cfg) { @@ -1548,7 +1549,8 @@ static int pbx_load_module(void) "writeprotect")); v = ast_variable_browse(cfg, "globals"); while(v) { - pbx_builtin_setvar_helper(NULL, v->name, v->value); + pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1); + pbx_builtin_setvar_helper(NULL, v->name, realvalue); v = v->next; } cxt = ast_category_browse(cfg, NULL); -- cgit v1.2.3