]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Jcolp pointed out that num will also match number
authorRichard Mudgett <rmudgett@digium.com>
Thu, 4 Dec 2008 01:36:39 +0000 (01:36 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 4 Dec 2008 01:36:39 +0000 (01:36 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160856 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_callerid.c

index b44d7bae9ba15f74b3cf41267750759f869f75c6..8bce770a2b77f83da63ae6421f82de010e65af95 100644 (file)
@@ -137,8 +137,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);
@@ -154,8 +154,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);
                        }
@@ -209,8 +209,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);