aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-12 19:58:00 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-12 19:58:00 +0000
commit0fc96ee360949f2634c21fb5c7ff350dea98edb8 (patch)
treebc97635d8b63a667a493cfd3cffb71e2df355100 /main/pbx.c
parenta03b7b9f7a21cb806666013f0e25830a1cd98b65 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@239571 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index ed14a65f0..e06577ee3 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -8003,7 +8003,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 {