]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge Script <automerge@asterisk.org>
Thu, 19 Jul 2007 16:29:34 +0000 (16:29 +0000)
committerAutomerge Script <automerge@asterisk.org>
Thu, 19 Jul 2007 16:29:34 +0000 (16:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75976 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index ad120dbdcf80a0d7c89173ed6ab747ddf1ebb596..3351d81f9fde1072989e843ceb17fa3db39158a5 100644 (file)
@@ -6710,7 +6710,9 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
                                if (option_debug)
                                        ast_log(LOG_DEBUG, "Packet arrived out of order (expecting %d, got %d) (frametype = %d, subclass = %d)\n", 
                                        iaxs[fr->callno]->iseqno, fr->oseqno, f.frametype, f.subclass);
-                               if (iaxs[fr->callno]->iseqno > fr->oseqno) {
+                               /* Check to see if we need to request retransmission,
+                                * and take sequence number wraparound into account */
+                               if ((unsigned char) (iaxs[fr->callno]->iseqno - fr->oseqno) < 128) {
                                        /* If we've already seen it, ack it XXX There's a border condition here XXX */
                                        if ((f.frametype != AST_FRAME_IAX) || 
                                                        ((f.subclass != IAX_COMMAND_ACK) && (f.subclass != IAX_COMMAND_INVAL))) {