[asterisk-commits] trunk r21816 - /trunk/manager.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 21 03:31:25 MST 2006


Author: rizzo
Date: Fri Apr 21 05:31:23 2006
New Revision: 21816

URL: http://svn.digium.com/view/asterisk?rev=21816&view=rev
Log:
more NULL and "" equivalence in cid fields


Modified:
    trunk/manager.c

Modified: trunk/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/manager.c?rev=21816&r1=21815&r2=21816&view=diff
==============================================================================
--- trunk/manager.c (original)
+++ trunk/manager.c Fri Apr 21 05:31:23 2006
@@ -1200,9 +1200,9 @@
 			"%s"
 			"\r\n",
 			c->name, 
-			c->cid.cid_num ? c->cid.cid_num : "<unknown>", 
-			c->cid.cid_num ? c->cid.cid_num : "<unknown>", 
-			c->cid.cid_name ? c->cid.cid_name : "<unknown>", 
+			S_OR(c->cid.cid_num, "<unknown>"), 
+			S_OR(c->cid.cid_num, "<unknown>"), 
+			S_OR(c->cid.cid_name, "<unknown>"), 
 			c->accountcode,
 			ast_state2str(c->_state), c->context,
 			c->exten, c->priority, (long)elapsed_seconds, bridge, c->uniqueid, idText);
@@ -1221,9 +1221,9 @@
 			"%s"
 			"\r\n",
 			c->name, 
-			c->cid.cid_num ? c->cid.cid_num : "<unknown>", 
-			c->cid.cid_num ? c->cid.cid_num : "<unknown>", 
-			c->cid.cid_name ? c->cid.cid_name : "<unknown>", 
+			S_OR(c->cid.cid_num, "<unknown>"), 
+			S_OR(c->cid.cid_num, "<unknown>"), 
+			S_OR(c->cid.cid_name, "<unknown>"), 
 			c->accountcode,
 			ast_state2str(c->_state), bridge, c->uniqueid, idText);
 		}
@@ -1356,9 +1356,9 @@
 		"CallerIDName: %s\r\n",
 		in->idtext, in->tech, in->data, in->context, in->exten, reason, 
 		chan ? chan->uniqueid : "<null>",
-		in->cid_num ? in->cid_num : "<unknown>",
-		in->cid_num ? in->cid_num : "<unknown>",
-		in->cid_name ? in->cid_name : "<unknown>"
+		S_OR(in->cid_num, "<unknown>"),
+		S_OR(in->cid_num, "<unknown>"),
+		S_OR(in->cid_name, "<unknown>")
 		);
 
 	/* Locked by ast_pbx_outgoing_exten or ast_pbx_outgoing_app */



More information about the asterisk-commits mailing list