[asterisk-commits] russell: branch 1.4 r96394 - /branches/1.4/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 3 16:44:23 CST 2008


Author: russell
Date: Thu Jan  3 16:44:22 2008
New Revision: 96394

URL: http://svn.digium.com/view/asterisk?view=rev&rev=96394
Log:
Don't crash if the iax2 pvt structure has been destroyed before we get to this point
(closes issue #11672, reported by snuffy, patched by me)

Modified:
    branches/1.4/channels/chan_iax2.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=96394&r1=96393&r2=96394
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Thu Jan  3 16:44:22 2008
@@ -8250,11 +8250,11 @@
 	iax_frame_wrap(fr, &f);
 
 	/* If this is our most recent packet, use it as our basis for timestamping */
-	if (iaxs[fr->callno]->last < fr->ts) {
+	if (iaxs[fr->callno] && iaxs[fr->callno]->last < fr->ts) {
 		/*iaxs[fr->callno]->last = fr->ts; (do it afterwards cos schedule/forward_delivery needs the last ts too)*/
 		fr->outoforder = 0;
 	} else {
-		if (option_debug && iaxdebug)
+		if (option_debug && iaxdebug && iaxs[fr->callno])
 			ast_log(LOG_DEBUG, "Received out of order packet... (type=%d, subclass %d, ts = %d, last = %d)\n", f.frametype, f.subclass, fr->ts, iaxs[fr->callno]->last);
 		fr->outoforder = -1;
 	}




More information about the asterisk-commits mailing list