[email protected] schrieb:
Bernhard 'Gustl' Bauer wrote:
First of all, only to make sure what you mean, are you referring to the PBUF_POOL running out of pbufs?

Yes

I'm not sure I understand the pbuf concept.
You have to call pbuf_free() on every pbuf chain passed to your application (via the receive callback). If can chain two chains together using pbuf_cat(), you only have to call pbuf_free() on the head of the chain.

This chained pbufs are new to me. I treated every call from tcp_recv as if it contained only 1 pbuf = packet.

  I have some data transfers
that exceed 1 tcp packet.

Every time http_recv is called I check if this is the 1st packet. If it
is I set a pointer to this pbuf and do not free this pbuf. If it is not
the 1st packet I store the data and free this pbuf.
What do you mean by 'store the data and free this pbuf'?

I copy the payload to a different location and call pbuf_free whit the pointer to pbuf.

Gustl


_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to