Hello,
this is a Request For Comments to have the return type of pbuf_free()
changed.
Currently, pbuf_free() returns the number of pbufs that have been
de-allocated from the head of a pbuf chain.
Throughout lwIP, this return value is "used" at one place, this is:
tcp.c/tcp_seg_free()
... which returns the output from pbuf_free().
tcp.c/tcp_segs_free() (NOTE the extra s) calls tcp_seg_free()
and cumulates the return values from successive calls to
tcp_seg_free() and returns that as its own return value.
However, this count is used nowhere throughout the stack, so
effectively, the return value of pbuf_free() is used nowhere as
well.
My proposal is to have pbuf_free() return the first pbuf in the chain
that
still is being referenced (i.e. the new chain after pbuf_free() was
called
on the chain).
This may allow for easier pbuf memory allocation debugging.
Regards,
Leon Woestenberg
Axon Digital Design
------------------------------------------------------------------------
_______________________________________________
lwip-members mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/lwip-members