summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMichael L. Young <elgueromexicano@gmail.com>2012-11-12 20:18:47 +0000
committerMichael L. Young <elgueromexicano@gmail.com>2012-11-12 20:18:47 +0000
commitd04bf3021519473e8c39d16e26a56668f500fd8e (patch)
treef9b1e6d08c7e603779aef876629f40261630d870 /main
parent866d96814964b25a9ad2dea5bfea6aa95c096fb3 (diff)
Fix Dynamic Hints Variable Substition - Underscore Problem
When adding a dynamic hint, if an extension contains an underscore no variable subsitution is being performed. This patch changes from checking if the extension contains an underscore to checking if the extension begins with an underscore. (closes issue ASTERISK-20639) Reported by: Steven T. Wheeler Tested by: Steven T. Wheeler, Michael L. Young Patches: asterisk-20639-dynamic-hint-underscore.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2188/ ........ Merged revisions 376142 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376143 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376144 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/pbx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index ba66fcac5..e0fc3cbee 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -9566,7 +9566,7 @@ static int ast_add_extension2_lockopt(struct ast_context *con,
}
/* If we are adding a hint evalulate in variables and global variables */
- if (priority == PRIORITY_HINT && strstr(application, "${") && !strstr(extension, "_")) {
+ if (priority == PRIORITY_HINT && strstr(application, "${") && extension[0] != '_') {
struct ast_channel *c = ast_dummy_channel_alloc();
if (c) {