From 6d22c38e59a6b4a1cb198aea93a2883dbff932f3 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 22 Nov 2009 16:16:55 +0000 Subject: [PATCH] tcp_recv_null: call tcp_recved() if p != NULL to keep the window correct --- src/core/tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/tcp.c b/src/core/tcp.c index 99d18780..fc5c6624 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -920,11 +920,12 @@ tcp_seg_copy(struct tcp_seg *seg) * Default receive callback that is called if the user didn't register * a recv callback for the pcb. */ -static err_t +err_t tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { - arg = arg; + LWIP_UNUSED_ARG(arg); if (p != NULL) { + tcp_recved(pcb, p->tot_len); pbuf_free(p); } else if (err == ERR_OK) { return tcp_close(pcb);