[asterisk-commits] file: trunk r41574 - /trunk/main/rtp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Aug 31 07:46:47 MST 2006


Author: file
Date: Thu Aug 31 09:46:46 2006
New Revision: 41574

URL: http://svn.digium.com/view/asterisk?rev=41574&view=rev
Log:
Only write a received packet out if we are actually bridged to something

Modified:
    trunk/main/rtp.c

Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?rev=41574&r1=41573&r2=41574&view=diff
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Thu Aug 31 09:46:46 2006
@@ -2843,10 +2843,12 @@
 	}
 
 	/* If this came from the RTP stream, write out via RTP - if it's RTCP, write out via RTCP */
-	if (is_rtp)
-		bridge_p2p_rtp_write(rtp, header, res, hdrlen);
-	else if (is_rtcp)
-		bridge_p2p_rtcp_write(rtp, header, res);
+	if (ast_rtp_get_bridged(rtp)) {
+		if (is_rtp)
+			bridge_p2p_rtp_write(rtp, header, res, hdrlen);
+		else if (is_rtcp)
+			bridge_p2p_rtcp_write(rtp, header, res);
+	}
 
 	return 1;
 }



More information about the asterisk-commits mailing list