[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] chaining pbufs as an user
From: |
Mike Kleshov |
Subject: |
Re: [lwip-users] chaining pbufs as an user |
Date: |
Thu, 22 Jul 2010 18:01:42 +0400 |
On 22 July 2010 16:16, Bill Auerbach <address@hidden> 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