[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] bug about pbuf_queue() fuction
From: |
Paul Clarke |
Subject: |
RE: [lwip-users] bug about pbuf_queue() fuction |
Date: |
Wed, 24 Nov 2004 09:39:32 +1030 |
Hi,
I had a similar issue months ago, basically while processing a received
packet I checked for new received packets and reentered lwip. My initial
reaction was to put NULL checks around everything but really this just
makes things worst. I vote for an ASSERT, with a message indicating
that LWIP is being used incorrectly ie the fault is not in LWIP, but
the way the programmer has used it.
Paul
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf
> Of Kieran Mansley
> Sent: Wednesday, 24 November 2004 12:16 AM
> To: Mailing list for lwIP users
> Subject: Re: [lwip-users] bug about pbuf_queue() fuction
>
>
> On Tue, 23 Nov 2004, xcb wrote:
>
> > lwip-users
> > pbuf_queue() function in pbuf.c
> >
> > if ((p == NULL) || (n == NULL) ) return;
> > should be write to:
> > if ((p == NULL) || (n == NULL) || (p==n)) return;
>
> As these all indicate programming errors (I think the function should
> never be called with those combinations of arguments, unless anyone knows
> otherwise) I'm tempted to make them all asserts rather than silent
> failures. Would anyone object to this?
>
> Thanks
>
> Kieran
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>