tcp_recv_null: call tcp_recved() if p != NULL to keep the window correct

This commit is contained in:
goldsimon 2009-11-22 16:16:55 +00:00
parent 8a81cb4ba0
commit 6d22c38e59

View File

@ -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);