lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] questions on lwip (two TCP/IP sockets)


From: address@hidden
Subject: Re: [lwip-users] questions on lwip (two TCP/IP sockets)
Date: Thu, 12 Aug 2010 21:50:35 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

 Kieran Mansley wrote:
On 12 Aug 2010, at 20:16, Jeff Barber wrote:

I'd like to see someone more authoritative (like Simon or Kieran?)
weigh in on this but I'm pretty sure that the advice you cited is just
plain wrong.
Yes, it's very wrong.  It may once have been true in the dim past,
Hmm, "dim past"... that post seems to be only less than 2 months old, however, I don't remember having read it or I would have told the author that it's wrong...
  but even so it references memory after it was freed
And that's the point at which I'm really confused: Either our documentation is really really bad or the author of that post should first start programming with something easier than lwIP... accessing freed memory seems like a beginner's mistake to me (sorry if this sounds rude!), and (unfortunately) lwIP is a bit more complicated to handle than a simple "hello world" example :-(

Anyway:
1) pbuf_free() on the pbuf passed in is definitively the right thing to do (there are ways how to call pbuf_free on every single pbuf in a chain, but that involves more code and is not really advised)... and 2) please start from the existing examples in contrib: most of them are correct, and if they aren't we can fix them. Just starting from something you read somewhere isn't a good idea as you never know who wrote that and if it is correct...

BTW: Jeff, I don't think you really need our opinion on this as I fully agree to everything you wrote ;-)

Simon



reply via email to

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