mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 18:16:13 +00:00
api_lib.c: Fixed bug #5957 "Safe-thread problem inside netconn_recv" to return an error code if it's impossible to fetch a pbuf on a TCP connection (and not directly close the recvmbox).
This commit is contained in:
parent
953d783a3e
commit
0fe5dd8d43
@ -166,6 +166,11 @@ HISTORY
|
||||
|
||||
++ Bug fixes:
|
||||
|
||||
2007-05-23 Frédéric Bernon
|
||||
* api_lib.c: Fixed bug #5957 "Safe-thread problem inside netconn_recv" to return
|
||||
an error code if it's impossible to fetch a pbuf on a TCP connection (and not
|
||||
directly close the recvmbox).
|
||||
|
||||
2007-05-22 Simon Goldschmidt
|
||||
* tcp.c: Fixed bug #1895 (tcp_bind not correct) by introducing a list of
|
||||
bound but unconnected (and non-listening) tcp_pcbs.
|
||||
|
@ -496,12 +496,10 @@ netconn_recv(struct netconn *conn)
|
||||
if (conn->callback)
|
||||
(*conn->callback)(conn, NETCONN_EVT_RCVMINUS, len);
|
||||
|
||||
/* If we are closed, we indicate that we no longer wish to receive
|
||||
data by setting conn->recvmbox to SYS_MBOX_NULL. */
|
||||
/* If we are closed, we indicate that we no longer wish to use the socket */
|
||||
if (p == NULL) {
|
||||
memp_free(MEMP_NETBUF, buf);
|
||||
sys_mbox_free(conn->recvmbox);
|
||||
conn->recvmbox = SYS_MBOX_NULL;
|
||||
conn->err = ERR_CLSD;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user