[asterisk-commits] mjordan: trunk r401450 - in /trunk: ./ res/res_rtp_asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 22 18:10:23 CDT 2013


Author: mjordan
Date: Tue Oct 22 18:10:22 2013
New Revision: 401450

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401450
Log:
res_rtp_asterisk: Fix crash when RTCP is not available during SSRC change

In r400089, a patch was put in to correct erroneous RTCP statistic resets.
Unfortunately, ast_rtp_read can be called on an RTP instance that does not
have RTCP information. This patch prevents that crash by only resetting
the statistics if we do actually have an RTCP instance.

(issue AST-1174)

(closes issue ASTERISK-22667)
Reported by: John Bigelow
........

Merged revisions 401445 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 401446 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 401447 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_rtp_asterisk.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_rtp_asterisk.c?view=diff&rev=401450&r1=401449&r2=401450
==============================================================================
--- trunk/res/res_rtp_asterisk.c (original)
+++ trunk/res/res_rtp_asterisk.c Tue Oct 22 18:10:22 2013
@@ -3699,10 +3699,12 @@
 		rtp->rxcount = 0;
 		rtp->cycles = 0;
 		rtp->lastrxseqno = 0;
-		rtp->rtcp->expected_prior = 0;
-		rtp->rtcp->received_prior = 0;
 		rtp->last_seqno = 0;
 		rtp->last_end_timestamp = 0;
+		if (rtp->rtcp) {
+			rtp->rtcp->expected_prior = 0;
+			rtp->rtcp->received_prior = 0;
+		}
 	}
 
 	rtp->rxssrc = ssrc;




More information about the asterisk-commits mailing list