[asterisk-commits] mmichelson: branch 11 r372118 - /branches/11/res/res_rtp_asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 31 16:14:33 CDT 2012


Author: mmichelson
Date: Fri Aug 31 16:14:30 2012
New Revision: 372118

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372118
Log:
Prevent local RTP bridges from sending inappropriate formats to participants.

A change for Asterisk 11 caused a check for failure to incorrectly check the return
value. This resulted in the possibility of transmitting media that a party had not
negotiated. If this media happened to be G.729, then this could potentially result
in one-way audio if no G.729 translators are installed.

(closes issue ASTERISK-20296)
reported by NITESH BANSAL


Modified:
    branches/11/res/res_rtp_asterisk.c

Modified: branches/11/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_rtp_asterisk.c?view=diff&rev=372118&r1=372117&r2=372118
==============================================================================
--- branches/11/res/res_rtp_asterisk.c (original)
+++ branches/11/res/res_rtp_asterisk.c Fri Aug 31 16:14:30 2012
@@ -2789,7 +2789,7 @@
 	}
 
 	/* If the payload coming in is not one of the negotiated ones then send it to the core, this will cause formats to change and the bridge to break */
-	if (!ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance1), 0, NULL, bridged_payload) &&
+	if ((ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance1), 0, NULL, bridged_payload) == -1) &&
 	    !ast_rtp_codecs_get_payload_format(ast_rtp_instance_get_codecs(instance1), bridged_payload)) {
 		return -1;
 	}




More information about the asterisk-commits mailing list