[asterisk-commits] russell: branch 1.2 r75927 - /branches/1.2/channels/chan_iax2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 19 10:49:43 CDT 2007
Author: russell
Date: Thu Jul 19 10:49:42 2007
New Revision: 75927
URL: http://svn.digium.com/view/asterisk?view=rev&rev=75927
Log:
When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)
Modified:
branches/1.2/channels/chan_iax2.c
Modified: branches/1.2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_iax2.c?view=diff&rev=75927&r1=75926&r2=75927
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Thu Jul 19 10:49:42 2007
@@ -6710,7 +6710,9 @@
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))) {
More information about the asterisk-commits
mailing list