From 704f4a7d5cc9ef6b8780c20db9e69733d2fe0b34 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Wed, 10 Dec 2008 23:13:22 +0000 Subject: [PATCH] Merged revisions 162922,162930 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r162922 | tilghman | 2008-12-10 16:48:09 -0600 (Wed, 10 Dec 2008) | 7 lines Checking global variables here actually overwrote the previous substitution by channel variables, and in any case, was redundant; pbx_substitute_variables_helper ALREADY does substitution for global variables. (closes issue #13327) Reported by: pj ........ r162930 | tilghman | 2008-12-10 17:01:14 -0600 (Wed, 10 Dec 2008) | 2 lines Previously missing line, now the substitution works correctly ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@162949 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pbx.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/main/pbx.c b/main/pbx.c index 36d9e93e4f..f836419387 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -6942,18 +6942,10 @@ int ast_add_extension2(struct ast_context *con, if (priority == PRIORITY_HINT && strstr(application, "${") && !strstr(extension, "_")) { struct ast_channel c = {0, }; - /* Start out with regular variables */ ast_copy_string(c.exten, extension, sizeof(c.exten)); ast_copy_string(c.context, con->name, sizeof(c.context)); pbx_substitute_variables_helper(&c, application, expand_buf, sizeof(expand_buf)); - - /* Move on to global variables if they exist */ - ast_rwlock_rdlock(&globalslock); - if (AST_LIST_FIRST(&globals)) { - pbx_substitute_variables_varshead(&globals, application, expand_buf, sizeof(expand_buf)); - application = expand_buf; - } - ast_rwlock_unlock(&globalslock); + application = expand_buf; } length = sizeof(struct ast_exten);