|
From: | Alain Mouette |
Subject: | Re: [lwip-users] Bug: lwip_read with timeout (again) |
Date: | Fri, 31 Jul 2009 16:01:49 -0300 |
User-agent: | Thunderbird 2.0.0.17 (X11/20080914) |
Hi Kieran,I tried to follow your indication, but I am not sure if I went to the right files:
in err.h, the value of ERR_TIMEOUT changed from -12 to -3 and as a consequence, all error codes have changed! And now ERR_TIMEOUT is not fatal :)
==>> Is it safe to just copy all of them from the new err.h ??IN file: api_lib.c, function netconn_recv(), I found these 2 sniplests that may be relevant:
-----line 322 if (ERR_IS_FATAL(conn->err)) { return NULL; } -----line 341 #if LWIP_SO_RCVTIMEOif (sys_arch_mbox_fetch(conn->recvmbox, (void *)&p, conn->recv_timeout)==SYS_ARCH_TIMEOUT) {
conn->err = ERR_TIMEOUT; p = NULL; } #else ----- Thanks, Alain Kieran Mansley escreveu:
On Thu, 2009-07-30 at 19:10 -0300, Alain Mouette wrote:Please... I sent this 2 days ago and got no comment, has noone ever seen this?This was well tested, in fact it took me a full day to find the problem and the work-around.Should I send this to the BUG list at savanah???Sorry for not replying sooner. I think that this was fixed in 1.3.1: the timeout error is no longer treated as fatal. You could either upgrade to 1.3.1 or just backport this fix to your version as it was a really small change. Look in lwip/src/include/err.h and compare how ERR_TIMEOUT is used by the ERR_IS_FATAL() macro in your version and the current version. Kieran
[Prev in Thread] | Current Thread | [Next in Thread] |