[asterisk-commits] rmudgett: trunk r160856 - /trunk/funcs/func_callerid.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 3 19:36:40 CST 2008
Author: rmudgett
Date: Wed Dec 3 19:36:39 2008
New Revision: 160856
URL: http://svn.digium.com/view/asterisk?view=rev&rev=160856
Log:
Jcolp pointed out that num will also match number
Modified:
trunk/funcs/func_callerid.c
Modified: trunk/funcs/func_callerid.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_callerid.c?view=diff&rev=160856&r1=160855&r2=160856
==============================================================================
--- trunk/funcs/func_callerid.c (original)
+++ trunk/funcs/func_callerid.c Wed Dec 3 19:36:39 2008
@@ -137,8 +137,8 @@
snprintf(buf, len, "\"%s\" <%s>", name, num);
} else if (!strncasecmp("name", data, 4)) {
ast_copy_string(buf, name, len);
- } else if (!strncasecmp("num", data, 3)
- || !strncasecmp("number", data, 6)) {
+ } else if (!strncasecmp("num", data, 3)) {
+ /* also matches "number" */
ast_copy_string(buf, num, len);
} else {
ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
@@ -154,8 +154,8 @@
if (chan->cid.cid_name) {
ast_copy_string(buf, chan->cid.cid_name, len);
}
- } else if (!strncasecmp("num", data, 3)
- || !strncasecmp("number", data, 6)) {
+ } else if (!strncasecmp("num", data, 3)) {
+ /* also matches "number" */
if (chan->cid.cid_num) {
ast_copy_string(buf, chan->cid.cid_num, len);
}
@@ -209,8 +209,8 @@
if (chan->cdr) {
ast_cdr_setcid(chan->cdr, chan);
}
- } else if (!strncasecmp("num", data, 3)
- || !strncasecmp("number", data, 6)) {
+ } else if (!strncasecmp("num", data, 3)) {
+ /* also matches "number" */
ast_set_callerid(chan, value, NULL, NULL);
if (chan->cdr) {
ast_cdr_setcid(chan->cdr, chan);
More information about the asterisk-commits
mailing list