]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't crash if the iax2 pvt structure has been destroyed before we get to this point
authorRussell Bryant <russell@russellbryant.com>
Thu, 3 Jan 2008 22:44:22 +0000 (22:44 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 3 Jan 2008 22:44:22 +0000 (22:44 +0000)
(closes issue #11672, reported by snuffy, patched by me)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96394 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 34f91987caf0d5e81f5931fc450261ab724fd4b0..ef29068d19e10c63d1cbd26b1bb07d0d38ecb03d 100644 (file)
@@ -8250,11 +8250,11 @@ retryowner2:
        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;
        }