]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 376143 via svnmerge from
authorAutomerge script <automerge@asterisk.org>
Mon, 12 Nov 2012 20:25:29 +0000 (20:25 +0000)
committerAutomerge script <automerge@asterisk.org>
Mon, 12 Nov 2012 20:25:29 +0000 (20:25 +0000)
file:///srv/subversion/repos/asterisk/branches/10

................
  r376143 | elguero | 2012-11-12 14:15:27 -0600 (Mon, 12 Nov 2012) | 20 lines

  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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376165 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 814e57bd5547c8069c57cd1dbab9e9abe8ca446d..edfab51d2e368aeb1b883c98d90b2b8d686effc7 100644 (file)
@@ -8986,7 +8986,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) {