[asterisk-commits] russell: branch 1.4 r114248 - /branches/1.4/channels/chan_agent.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 18 10:24:10 CDT 2008


Author: russell
Date: Fri Apr 18 10:24:09 2008
New Revision: 114248

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114248
Log:
Ensure that we don't ast_strdupa(NULL)
(closes issue #12476)
Reported by: davidw
Patch by me

Modified:
    branches/1.4/channels/chan_agent.c

Modified: branches/1.4/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_agent.c?view=diff&rev=114248&r1=114247&r2=114248
==============================================================================
--- branches/1.4/channels/chan_agent.c (original)
+++ branches/1.4/channels/chan_agent.c Fri Apr 18 10:24:09 2008
@@ -1500,7 +1500,7 @@
 			loginChan = ast_strdupa(p->chan->name);
 			if (p->owner && p->owner->_bridge) {
 				if (ast_bridged_channel(p->owner)) {
-					talkingtoChan = ast_strdupa(ast_bridged_channel(p->owner)->cid.cid_num);
+					talkingtoChan = ast_strdupa(S_OR(ast_bridged_channel(p->owner)->cid.cid_num, ""));
 				} else {
 					talkingtoChan = "n/a";
 				}




More information about the asterisk-commits mailing list