[asterisk-commits] tilghman: trunk r239571 - /trunk/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 12 13:58:01 CST 2010


Author: tilghman
Date: Tue Jan 12 13:58:00 2010
New Revision: 239571

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=239571
Log:
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)

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=239571&r1=239570&r2=239571
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Jan 12 13:58:00 2010
@@ -8003,7 +8003,9 @@
 	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 {




More information about the asterisk-commits mailing list