[asterisk-commits] mmichelson: trunk r256646 - /trunk/channels/chan_local.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 9 16:41:33 CDT 2010


Author: mmichelson
Date: Fri Apr  9 16:41:30 2010
New Revision: 256646

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=256646
Log:
Prevent crash when originating a call to a local channel.

Call completion code tries to grab the call completion parameters
from the requesting channel during local_request. When originating
a call to a local channel, however, this channel is NULL. This
was causing an issue for me when trying to run a test script.


Modified:
    trunk/channels/chan_local.c

Modified: trunk/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_local.c?view=diff&rev=256646&r1=256645&r2=256646
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Fri Apr  9 16:41:30 2010
@@ -869,7 +869,7 @@
 			AST_LIST_UNLOCK(&locals);
 			p = local_pvt_destroy(p);
 		}
-		if (ast_channel_cc_params_init(chan, ast_channel_get_cc_config_params((struct ast_channel *)requestor))) {
+		if (ast_channel_cc_params_init(chan, requestor ? ast_channel_get_cc_config_params((struct ast_channel *)requestor) : NULL)) {
 			chan = ast_channel_release(chan);
 			p = local_pvt_destroy(p);
 		}




More information about the asterisk-commits mailing list