lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5959] Implement SO_RCVTIMEO for accept and recv (on


From: Frédéric Bernon
Subject: [lwip-devel] [patch #5959] Implement SO_RCVTIMEO for accept and recv (on TCP netconn)
Date: Wed, 23 May 2007 19:24:57 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #2, patch #5959 (project lwip):

Ok, I check in. Just a tips about the fact to call or not the conn->callback
with NETCONN_EVT_RCVMINUS, I'm not 100% sure of the thing to do, but I have
try to respect the current instruction flow, but tell me.

It is also possible to get a "simpler" code with #if/#else/#endif in the
code, with a macro like this at the beginning of api_lib.c:

#if LWIP_SO_RCVTIMEO
#define CONN_RCVTIMEO(conn) (conn->recv_timeout)
#else
#define CONN_RCVTIMEO(conn) (0)
#endif /* LWIP_SO_RCVTIMEO*/ 

And further in the code always let the test like this:

if (sys_arch_mbox_fetch(conn->recvmbox, (void *)&p,
CONN_RCVTIMEO(conn))==SYS_ARCH_TIMEOUT) {
  p = NULL;
}

It better to get a code more lisible, but add a test and a set.

Tell me if you prefer...



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5959>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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