[asterisk-commits] trunk r21835 - /trunk/res/res_agi.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 21 04:02:31 MST 2006


Author: rizzo
Date: Fri Apr 21 06:02:28 2006
New Revision: 21835

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


Modified:
    trunk/res/res_agi.c

Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?rev=21835&r1=21834&r2=21835&view=diff
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Fri Apr 21 06:02:28 2006
@@ -348,14 +348,14 @@
 	fdprintf(fd, "agi_uniqueid: %s\n", chan->uniqueid);
 
 	/* ANI/DNIS */
-	fdprintf(fd, "agi_callerid: %s\n", chan->cid.cid_num ? chan->cid.cid_num : "unknown");
-	fdprintf(fd, "agi_calleridname: %s\n", chan->cid.cid_name ? chan->cid.cid_name : "unknown");
+	fdprintf(fd, "agi_callerid: %s\n", S_OR(chan->cid.cid_num, "unknown"));
+	fdprintf(fd, "agi_calleridname: %s\n", S_OR(chan->cid.cid_name, "unknown"));
 	fdprintf(fd, "agi_callingpres: %d\n", chan->cid.cid_pres);
 	fdprintf(fd, "agi_callingani2: %d\n", chan->cid.cid_ani2);
 	fdprintf(fd, "agi_callington: %d\n", chan->cid.cid_ton);
 	fdprintf(fd, "agi_callingtns: %d\n", chan->cid.cid_tns);
-	fdprintf(fd, "agi_dnid: %s\n", chan->cid.cid_dnid ? chan->cid.cid_dnid : "unknown");
-	fdprintf(fd, "agi_rdnis: %s\n", chan->cid.cid_rdnis ? chan->cid.cid_rdnis : "unknown");
+	fdprintf(fd, "agi_dnid: %s\n", S_OR(chan->cid.cid_dnid, "unknown"));
+	fdprintf(fd, "agi_rdnis: %s\n", S_OR(chan->cid.cid_rdnis, "unknown"));
 
 	/* Context information */
 	fdprintf(fd, "agi_context: %s\n", chan->context);



More information about the asterisk-commits mailing list