mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 23:12:09 +00:00
tcp_recv_null: call tcp_recved() if p != NULL to keep the window correct
This commit is contained in:
parent
8a81cb4ba0
commit
6d22c38e59
@ -920,11 +920,12 @@ tcp_seg_copy(struct tcp_seg *seg)
|
|||||||
* Default receive callback that is called if the user didn't register
|
* Default receive callback that is called if the user didn't register
|
||||||
* a recv callback for the pcb.
|
* 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)
|
tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
|
||||||
{
|
{
|
||||||
arg = arg;
|
LWIP_UNUSED_ARG(arg);
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
|
tcp_recved(pcb, p->tot_len);
|
||||||
pbuf_free(p);
|
pbuf_free(p);
|
||||||
} else if (err == ERR_OK) {
|
} else if (err == ERR_OK) {
|
||||||
return tcp_close(pcb);
|
return tcp_close(pcb);
|
||||||
|
Loading…
Reference in New Issue
Block a user