mirror of
https://github.com/espressif/esp-lwip.git
synced 2025-08-06 18:23:42 +08:00
Fix SLIP RX linked list append.
Append to the linked list of pbuf objects was broken so that the second (and subsequent) packets received in a SLIP transaction would be appended to themselves and consequently lost. This resulted in these packets being dropped and the system suffering extreme memory leakage. Merges https://github.com/espressif/esp-lwip/pull/25
This commit is contained in:

committed by
David Čermák

parent
7285b846a2
commit
01d0ecff2d
@ -497,7 +497,11 @@ slipif_rxbyte_enqueue(struct netif *netif, u8_t data)
|
|||||||
if (priv->rxpackets != NULL) {
|
if (priv->rxpackets != NULL) {
|
||||||
#if SLIP_RX_QUEUE
|
#if SLIP_RX_QUEUE
|
||||||
/* queue multiple pbufs */
|
/* queue multiple pbufs */
|
||||||
|
#if ESP_LWIP
|
||||||
|
struct pbuf *q = priv->rxpackets;
|
||||||
|
#else
|
||||||
struct pbuf *q = p;
|
struct pbuf *q = p;
|
||||||
|
#endif
|
||||||
while (q->next != NULL) {
|
while (q->next != NULL) {
|
||||||
q = q->next;
|
q = q->next;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user