lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip_accept() blocks for non-blocking sockets ?


From: Rishi Khan
Subject: Re: [lwip-users] lwip_accept() blocks for non-blocking sockets ?
Date: Thu, 2 Oct 2008 13:43:04 -0400

Kieran is correct. I used the example from lwip_recvfrom and didn't note that sock->lastdata is irrelevant [and always false]. It doesn't make the code incorrect, but it is irrelevant.

Rishi

On Oct 2, 2008, at 10:17 AM, Jonathan Larmour wrote:

Kieran Mansley wrote:
On Wed, 2008-10-01 at 21:56 +0100, Jonathan Larmour wrote:
address@hidden wrote:

I've noticed this too. It's a relatively easy fix. In api/ sockets.c in
lwip_accept, put this:
 if (sock->flags & O_NONBLOCK)
 {
   if (!(sock->lastdata || sock->rcvevent))

I'm not sure I understand why sock->lastdata is relevant?
It shouldn't be for accept.  It's relevant for lwip_recvfrom() of
course, where the code came from.

Ok, and given Tamas already verified it, I've checked in something that should work based on that.

Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------ Opinions==mine


_______________________________________________
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]