From d80a38310a3808017b68be35d22122e1f883a5b4 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Tue, 12 Jan 2010 19:58:00 +0000 Subject: [PATCH] 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/trunk@239571 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pbx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/pbx.c b/main/pbx.c index ed14a65f0d..e06577ee37 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 {