mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
First fix for "bug #20900 : Potential crash error problem with netconn_peer & netconn_addr". Introduce NETCONN_LISTEN netconn_state and remove obsolete ones (NETCONN_RECV & NETCONN_ACCEPT).
This commit is contained in:
parent
5e7b7cba31
commit
54c1025ec0
@ -312,6 +312,11 @@ HISTORY
|
||||
|
||||
++ Bug fixes:
|
||||
|
||||
2007-08-27 Frédéric Bernon
|
||||
* api.h, api_lib.c, api_msg.c: First fix for "bug #20900 : Potential crash error
|
||||
problem with netconn_peer & netconn_addr". Introduce NETCONN_LISTEN netconn_state
|
||||
and remove obsolete ones (NETCONN_RECV & NETCONN_ACCEPT).
|
||||
|
||||
2007-08-24 Kieran Mansley
|
||||
* inet.c Modify (acc >> 16) test to ((acc >> 16) != 0) to help buggy
|
||||
compiler (Paradigm C++)
|
||||
|
@ -594,7 +594,7 @@ netconn_recv(struct netconn *conn)
|
||||
|
||||
if (conn->type == NETCONN_TCP) {
|
||||
#if LWIP_TCP
|
||||
if (conn->pcb.tcp->state == LISTEN) {
|
||||
if (conn->state == NETCONN_LISTEN) {
|
||||
conn->err = ERR_CONN;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -676,6 +676,7 @@ do_listen(struct api_msg_msg *msg)
|
||||
}
|
||||
}
|
||||
if (msg->conn->err == ERR_OK) {
|
||||
msg->conn->state = NETCONN_LISTEN;
|
||||
msg->conn->pcb.tcp = lpcb;
|
||||
tcp_arg(msg->conn->pcb.tcp, msg->conn);
|
||||
tcp_accept(msg->conn->pcb.tcp, accept_function);
|
||||
|
@ -74,8 +74,7 @@ enum netconn_type {
|
||||
enum netconn_state {
|
||||
NETCONN_NONE,
|
||||
NETCONN_WRITE,
|
||||
NETCONN_ACCEPT,
|
||||
NETCONN_RECV,
|
||||
NETCONN_LISTEN,
|
||||
NETCONN_CONNECT,
|
||||
NETCONN_CLOSE
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user