From b15c4758aecd086984527d006230c4b8ca72a39f Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Thu, 4 Dec 2008 01:41:25 +0000 Subject: [PATCH] Merged revisions 160856 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r160856 | rmudgett | 2008-12-03 19:36:39 -0600 (Wed, 03 Dec 2008) | 1 line Jcolp pointed out that num will also match number ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@160859 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- funcs/func_callerid.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c index cc1e92166c..db1e85ddb4 100644 --- a/funcs/func_callerid.c +++ b/funcs/func_callerid.c @@ -69,8 +69,8 @@ static int callerid_read(struct ast_channel *chan, const char *cmd, char *data, 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); @@ -86,8 +86,8 @@ static int callerid_read(struct ast_channel *chan, const char *cmd, char *data, 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); } @@ -141,8 +141,8 @@ static int callerid_write(struct ast_channel *chan, const char *cmd, char *data, 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);