Fixed bug #27709: conn->err race condition on netconn_recv() timeout by directly returning when sys_arch_mbox_fetch times out.

This commit is contained in:
goldsimon 2009-10-15 14:33:18 +00:00
parent 2dc027401f
commit a9740c6a44
2 changed files with 6 additions and 1 deletions

View File

@ -43,6 +43,10 @@ HISTORY
++ Bugfixes:
2009-10-15: Simon Goldschmidt
* api_msg.c: Fixed bug #27709: conn->err race condition on netconn_recv()
timeout
2009-10-15: Simon Goldschmidt
* autoip.c: Fixed bug #27704: autoip starts with wrong address
LWIP_AUTOIP_CREATE_SEED_ADDR() returned address in host byte order instead

View File

@ -327,8 +327,9 @@ netconn_recv(struct netconn *conn)
#if LWIP_SO_RCVTIMEO
if (sys_arch_mbox_fetch(conn->recvmbox, (void *)&p, conn->recv_timeout)==SYS_ARCH_TIMEOUT) {
memp_free(MEMP_NETBUF, buf);
conn->err = ERR_TIMEOUT;
p = NULL;
return NULL;
}
#else
sys_arch_mbox_fetch(conn->recvmbox, (void *)&p, 0);