sys.h, api_lib.c, api_msg.c, sockets.c: fix bug #21698: "netconn->recv_avail is not protected" by using new macros for interlocked access to modify/test netconn->recv_avail.

This commit is contained in:
goldsimon
2007-12-21 14:59:10 +00:00
parent 1cb470662b
commit 48e62e25e9
5 changed files with 64 additions and 9 deletions

View File

@@ -1872,7 +1872,7 @@ lwip_ioctl(int s, long cmd, void *argp)
return -1;
}
*((u16_t*)argp) = sock->conn->recv_avail;
SYS_ARCH_GET(sock->conn->recv_avail, *((u16_t*)argp));
/* Check if there is data left from the last recv operation. /maq 041215 */
if (sock->lastdata) {