aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-07 20:47:59 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-07 20:47:59 +0000
commit06d238bd07082985e8c4202e7d6c0c94996604d3 (patch)
treecd5e11f6ee2f1456c060029a1b3ca79e57f1298d /pbx.c
parent1467ce2ea0aa595428812306cf302e6eb7008851 (diff)
Merged revisions 7382 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7382 | kpfleming | 2005-12-07 14:46:55 -0600 (Wed, 07 Dec 2005) | 2 lines ensure that hints are allowed to use global variable references ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7383 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r--pbx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pbx.c b/pbx.c
index 6b1e3acd3..4850cca5c 100644
--- a/pbx.c
+++ b/pbx.c
@@ -4614,6 +4614,16 @@ int ast_add_extension2(struct ast_context *con,
int res;
int length;
char *p;
+ char expand_buf[VAR_BUF_SIZE];
+
+ /* if we are adding a hint, and there are global variables, and the hint
+ contains variable references, then expand them
+ */
+ if ((priority == PRIORITY_HINT) && AST_LIST_FIRST(&globals) && strstr(application, "${")) {
+ pbx_substitute_variables_varshead(&globals, application, expand_buf, sizeof(expand_buf));
+ application = expand_buf;
+ }
+
length = sizeof(struct ast_exten);
length += strlen(extension) + 1;
length += strlen(application) + 1;