From 8273b54108445f7bb8dff4cbfada0922f13c2d73 Mon Sep 17 00:00:00 2001 From: kieranm Date: Wed, 14 Jul 2004 09:48:27 +0000 Subject: [PATCH] Kieran Mansley - 14th July 2004 * Only move a single segment from the unacked queue to the unsent queue when performing a retransmit --- src/core/tcp_out.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index b8ee4426..53d1f167 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -577,14 +577,10 @@ tcp_rexmit(struct tcp_pcb *pcb) return; } - /* Move all unacked segments to the unsent queue. */ - for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); - - seg->next = pcb->unsent; - pcb->unsent = pcb->unacked; - - pcb->unacked = NULL; - + /* Move the first unacked segment to the unsent queue */ + seg = pcb->unacked->next; + pcb->unacked->next = pcb->unsent; + pcb->unacked = seg; pcb->snd_nxt = ntohl(pcb->unsent->tcphdr->seqno);