[svn-commits] rmudgett: branch group/issue8824 r147010 - /team/group/issue8824/funcs/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Oct 6 20:29:29 CDT 2008


Author: rmudgett
Date: Mon Oct  6 20:29:29 2008
New Revision: 147010

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147010
Log:
Issue #13340 already fixed for this function on this branch

Modified:
    team/group/issue8824/funcs/func_callerid.c

Modified: team/group/issue8824/funcs/func_callerid.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/funcs/func_callerid.c?view=diff&rev=147010&r1=147009&r2=147010
==============================================================================
--- team/group/issue8824/funcs/func_callerid.c (original)
+++ team/group/issue8824/funcs/func_callerid.c Mon Oct  6 20:29:29 2008
@@ -51,7 +51,6 @@
 static int callerid_read(struct ast_channel *chan, const char *cmd, char *data,
 			 char *buf, size_t len)
 {
-	int res = -1;
 	char *opt = data;
 
 	/* Ensure that the buffer is empty */
@@ -68,13 +67,10 @@
 
 		if (!strncasecmp("all", data, 3)) {
 			snprintf(buf, len, "\"%s\" <%s>", name, num);
-			res = 0;
 		} else if (!strncasecmp("name", data, 4)) {
 			ast_copy_string(buf, name, len);
-			res = 0;
 		} else if (!strncasecmp("num", data, 3)) {
 			ast_copy_string(buf, num, len);
-			res = 0;
 		} else {
 			ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
 		}
@@ -83,42 +79,34 @@
 
 		if (!strncasecmp("all", data, 3)) {
 			snprintf(buf, len, "\"%s\" <%s>",
-				 S_OR(chan->cid.cid_name, ""),
-				 S_OR(chan->cid.cid_num, ""));
-			res = 0;
+				S_OR(chan->cid.cid_name, ""),
+				S_OR(chan->cid.cid_num, ""));
 		} else if (!strncasecmp("name", data, 4)) {
 			if (chan->cid.cid_name) {
 				ast_copy_string(buf, chan->cid.cid_name, len);
-				res = 0;
 			}
 		} else if (!strncasecmp("num", data, 3)) {
 			if (chan->cid.cid_num) {
 				ast_copy_string(buf, chan->cid.cid_num, len);
-				res = 0;
 			}
 		} else if (!strncasecmp("ani", data, 3)) {
 			if (!strncasecmp(data + 3, "2", 1)) {
 				snprintf(buf, len, "%d", chan->cid.cid_ani2);
 			} else if (chan->cid.cid_ani) {
 				ast_copy_string(buf, chan->cid.cid_ani, len);
-				res = 0;
 			}
 		} else if (!strncasecmp("dnid", data, 4)) {
 			if (chan->cid.cid_dnid) {
 				ast_copy_string(buf, chan->cid.cid_dnid, len);
-				res = 0;
 			}
 		} else if (!strncasecmp("rdnis", data, 5)) {
 			if (chan->cid.cid_rdnis) {
 				ast_copy_string(buf, chan->cid.cid_rdnis, len);
-				res = 0;
 			}
 		} else if (!strncasecmp("pres", data, 4)) {
 			ast_copy_string(buf, ast_named_caller_presentation(chan->cid.cid_pres), len);
-			res = 0;
 		} else if (!strncasecmp("ton", data, 3)) {
 			snprintf(buf, len, "%d", chan->cid.cid_ton);
-			res = 0;
 		} else {
 			ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
 		}
@@ -126,7 +114,7 @@
 		ast_channel_unlock(chan);
 	}
 
-	return res;
+	return 0;
 }
 
 static int callerid_write(struct ast_channel *chan, const char *cmd, char *data,




More information about the svn-commits mailing list