]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 239571 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 12 Jan 2010 20:00:53 +0000 (20:00 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 12 Jan 2010 20:00:53 +0000 (20:00 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r239571 | tilghman | 2010-01-12 13:58:00 -0600 (Tue, 12 Jan 2010) | 5 lines

  Blank callerid and NULL callerid should not compare equal.
  The second is the default state for matching CID in the dialplan (no matching)
  while the first matches one particular CallerID.  This is a regression.
  (fixes AST-314, SWP-611)
........

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

main/pbx.c

index 165c2b73501c049617730197609baaa54c5143f2..7d04c620387c9215be86ab939e4afe26ffcb3548 100644 (file)
@@ -7141,7 +7141,9 @@ static int ast_add_extension2_lockopt(struct ast_context *con,
        p += ext_strncpy(p, extension, strlen(extension) + 1) + 1;
        tmp->priority = priority;
        tmp->cidmatch = p;      /* but use p for assignments below */
-       if (!ast_strlen_zero(callerid)) {
+
+       /* Blank callerid and NULL callerid are two SEPARATE things.  Do NOT confuse the two!!! */
+       if (callerid) {
                p += ext_strncpy(p, callerid, strlen(callerid) + 1) + 1;
                tmp->matchcid = 1;
        } else {