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
1.6.1
Tilghman Lesher 17 years ago
parent f358a95371
commit 704f4a7d5c

@ -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);

Loading…
Cancel
Save