"Bernhard \'Gustl\' Bauer" wrote: > This chained pbufs are new to me. I treated every call from tcp_recv as > if it contained only 1 pbuf = packet.
For RX, that depends on your driver and might well be true for simple cases. However if you enable out-of-sequence queueing (TCP_QUEUE_OOSEQ, enabled by default), you can get multiple (queued) packets with one recv call. Just check if p->next is != NULL. Still, calling pbuf_free() on the first pbuf of this queue should be enough, so your pbuf leak is probably somewhere else. How do you know you have a leak, anyway? Does your device stall? Or is it only temporary? Maybe you just configured the number of pbufs too low? > Don't I get a tcp_err in this case? This would free pbuf. That depends on the remote side. If you simply switch off the remote side or unplug its cable, you won't get a tcp_err (or not for some time, at least): tcp_err is called when the remote side sends a RST or your connection times out (and timing out can be a long time for TCP if the remote side simply doesn't answer at all). Simon -- Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
