From 2e6d03269117ca4854e6015f6cebbe2e5b36772e Mon Sep 17 00:00:00 2001 From: jani Date: Wed, 5 Nov 2003 09:21:14 +0000 Subject: [PATCH] patch #2200 from Karl Jeacle, fixes tcp_output --- src/core/tcp_out.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index f8f4b9c1..a9f58ae1 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -363,7 +363,13 @@ tcp_output(struct tcp_pcb *pcb) seg = pcb->unsent; - useg = pcb->unacked; + + /* useg should point to last segment on unacked queue */ + useg = pcb->unacked; + if (useg != NULL) { + for (; useg->next != NULL; useg = useg->next); + } + /* If the TF_ACK_NOW flag is set, we check if there is data that is to be sent. If data is to be sent out, we'll just piggyback our