From bcc87ef8516ef1f51b6b944fdb9bc40df9c28431 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 25 Oct 2009 18:47:44 +0000 Subject: [PATCH] bug-fix in the TCP_EVENT_RECV macro (has to call tcp_recved if pcb->recv is NULL to keep rcv_wnd correct) --- CHANGELOG | 4 ++++ src/include/lwip/tcp.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 448f2177..96afe5ea 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -43,6 +43,10 @@ HISTORY ++ Bugfixes: + 2009-10-25: Simon Goldschmidt + * tcp.h: bug-fix in the TCP_EVENT_RECV macro (has to call tcp_recved if + pcb->recv is NULL to keep rcv_wnd correct) + 2009-10-25: Simon Goldschmidt * tcp_in.c: Fixed bug #26251: RST process in TIME_WAIT TCP state diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index 4b5823ff..694a16b8 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -489,8 +489,10 @@ err_t lwip_tcp_event(void *arg, struct tcp_pcb *pcb, (ret) = (pcb)->recv((pcb)->callback_arg,(pcb),(p),(err)); \ } else { \ (ret) = ERR_OK; \ - if (p != NULL) \ + if (p != NULL) { \ + tcp_recved((pcb), ((struct pbuf*)(p))->tot_len); \ pbuf_free(p); \ + } \ } \ } while (0)