lwip-users
[Top][All Lists]
Advanced

[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 09:55:21 +0400

On 22 July 2010 00:57, Bill Auerbach <address@hidden> wrote:
> After seeing this example, I don’t understand the while loop, while
> pbuf_free returns 0 – can it get stuck there?  I also wonder why
> pbuf_dechain wasn’t used instead of deleting the first pbuf in the chain
> manually?

Again, if I am not mistaken, the while loop is needed if there is more
than 1 reference to the pbuf in question. Perhaps, in this particular
program this will never happen. Maybe the author of the code put the
while loop there just to be on the safe side?
As for pbuf_dechain(), I'm not sure it's the right function to use.
You still have to free the pbuf, and pbuf_dechain() doesn't seem to do
that.

- mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]