[asterisk-commits] kmoore: trunk r409904 - in /trunk: ./ bridges/bridge_native_rtp.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 5 13:28:50 CST 2014
Author: kmoore
Date: Wed Mar 5 13:28:31 2014
New Revision: 409904
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=409904
Log:
bridge_native_rtp: Fix crash involving masquerade
It is possible for a channel to be masqueraded out of a bridge which
means it may no longer have RTP glue to check upon leaving said bridge.
If this situation occurred (it's possible at least during dial and call
pickup) then Asterisk would crash. This change makes sure the glue is
checked before use.
(closes issue AST-1290)
Reported by: John Bigelow
........
Merged revisions 409900 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/bridges/bridge_native_rtp.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/bridges/bridge_native_rtp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_native_rtp.c?view=diff&rev=409904&r1=409903&r2=409904
==============================================================================
--- trunk/bridges/bridge_native_rtp.c (original)
+++ trunk/bridges/bridge_native_rtp.c Wed Mar 5 13:28:31 2014
@@ -452,9 +452,19 @@
native_rtp_bridge_framehook_detach(bridge_channel);
glue = ast_rtp_instance_get_glue(ast_channel_tech(bridge_channel->chan)->type);
+ if (!glue) {
+ return;
+ }
+
glue->get_rtp_info(bridge_channel->chan, &instance);
- glue->get_vrtp_info ? glue->get_vrtp_info(bridge_channel->chan, &vinstance) : AST_RTP_GLUE_RESULT_FORBID;
- glue->get_trtp_info ? glue->get_trtp_info(bridge_channel->chan, &tinstance) : AST_RTP_GLUE_RESULT_FORBID;
+
+ if (glue->get_vrtp_info) {
+ glue->get_vrtp_info(bridge_channel->chan, &vinstance);
+ }
+
+ if (glue->get_trtp_info) {
+ glue->get_trtp_info(bridge_channel->chan, &tinstance);
+ }
/* Tear down P2P bridges */
if (instance) {
More information about the asterisk-commits
mailing list