diff options
author | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-04 01:38:08 +0000 |
---|---|---|
committer | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-04 01:38:08 +0000 |
commit | 2aaeec3ab26f9e7dcce84d1a6b901f4c738fdc5f (patch) | |
tree | c57e192239e43719b4c40c186b90bfd797c223eb /funcs | |
parent | 829affe4e26bd5244964b664ca0222e5657a5089 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.6.0@160857 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_callerid.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c index f5ea66547..a8904d384 100644 --- a/funcs/func_callerid.c +++ b/funcs/func_callerid.c @@ -66,8 +66,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); @@ -83,8 +83,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); } @@ -136,8 +136,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); |