lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] new data callback with pbuf pointer of zero


From: JM
Subject: Re: [lwip-users] new data callback with pbuf pointer of zero
Date: Sun, 22 Nov 2009 12:23:30 -0800 (PST)

Oops, somehow I missed that statement in that file!  (I have looked at it several times previously)

--- On Sun, 11/22/09, address@hidden <address@hidden> wrote:

From: address@hidden <address@hidden>
Subject: Re: [lwip-users] new data callback with pbuf pointer of zero
To: "Mailing list for lwIP users" <address@hidden>
Date: Sunday, November 22, 2009, 1:54 PM

JM wrote:
> I'm a bit confused by this one.  It took me a while to track down the cause of my crashes, but I finally discovered that the callback specified by tcp_recv was being passed a a pointer of zero for the pbuf.  The callback function never checked for this and cause the processor to throw an exception because of the invalid pbuf pointer.  Anyway, I have the callback return if the passed pbuf is zero and now it's fine.  The passed error code is zero.
> What would cause it to be passed zero for the pbuf?  By definition, isn't this callback used when there is data to provide?  I'm using 1.3.0 in raw mode.
>
>
Excerpt from doc/rawapi.txt
The callback function will be passed a NULL pbuf to indicate that the remote host has closed the connection.

Does that make it clear enough? :-)

Simon


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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