mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 09:16:20 +00:00
pbuf_alloc() forgot to set tot_len field for PBUF_POOL pbufs.
This commit is contained in:
parent
08703f46f8
commit
9ed2b7e03c
@ -273,7 +273,9 @@ pbuf_alloc(pbuf_layer l, u16_t length, pbuf_flag flag)
|
||||
/*q->next = NULL;*/
|
||||
/* make previous pbuf point to this pbuf */
|
||||
r->next = q;
|
||||
/* set length of this pbuf */
|
||||
/* set total length of this pbuf and next in chain */
|
||||
q->tot_len = rem_len;
|
||||
/* this pbuf length is pool size, unless smaller sized tail */
|
||||
q->len = rem_len > PBUF_POOL_BUFSIZE? PBUF_POOL_BUFSIZE: rem_len;
|
||||
q->flags = PBUF_FLAG_POOL;
|
||||
q->payload = (void *)((u8_t *)q + sizeof(struct pbuf));
|
||||
|
Loading…
Reference in New Issue
Block a user