On 22 July 2010 16:16, Bill Auerbach <[email protected]> wrote: > Isn't that what the tail_gone = pbuf_free(q); does?
No. pbuf_dechain() keeps the first pbuf and frees the rest of the chain (the tail.) In the echo example, we want the opposite: free the first pbuf and keep the tail. The while loop is misleading, yes. It does not belong in a good example. In fact, I was using the echo program as reference to write my own code. I remember having an impression that many checks for error conditions where unnecessary in this program. For example, there is a check if new data is received after remote side closed connection. I would imagine this kind of check is performed within lwip code. There are other arguable checks as well. In short, this example program could use a review. - mike _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
