From: Kevin P. Fleming Date: Wed, 7 Dec 2005 20:47:59 +0000 (+0000) Subject: Merged revisions 7382 via svnmerge from X-Git-Tag: 1.4.0-beta1~3212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f791f18f7c2da5a9cd77fb28ea7eb8272f58518b;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/trunk@7383 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx.c b/pbx.c index 6b1e3acd39..4850cca5c0 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;