mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
Fixed bug #35817: do_connect() invalidly signals op_completed for UDP/RAW with LWIP_TCPIP_CORE_LOCKING==1
This commit is contained in:
parent
f8af1a7443
commit
8dbf572ea5
@ -76,6 +76,10 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2012-03-25: Simon Goldschmidt
|
||||
* api_msg.c: Fixed bug #35817: do_connect() invalidly signals op_completed
|
||||
for UDP/RAW with LWIP_TCPIP_CORE_LOCKING==1
|
||||
|
||||
2012-03-25: Simon Goldschmidt
|
||||
* api_msg.h, api_lib.c, api_msg.c, netifapi.c: fixed bug #35931: Name space
|
||||
pollution in api_msg.c and netifapi.c
|
||||
|
@ -983,6 +983,11 @@ lwip_netconn_do_connect(struct api_msg_msg *msg)
|
||||
if (msg->conn->pcb.tcp == NULL) {
|
||||
/* This may happen when calling netconn_connect() a second time */
|
||||
msg->err = ERR_CLSD;
|
||||
if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) {
|
||||
/* For TCP, netconn_connect() calls tcpip_apimsg(), so signal op_completed here. */
|
||||
sys_sem_signal(&msg->conn->op_completed);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
switch (NETCONNTYPE_GROUP(msg->conn->type)) {
|
||||
#if LWIP_RAW
|
||||
@ -1018,14 +1023,18 @@ lwip_netconn_do_connect(struct api_msg_msg *msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* For TCP, netconn_connect() calls tcpip_apimsg(), so signal op_completed here. */
|
||||
sys_sem_signal(&msg->conn->op_completed);
|
||||
return;
|
||||
#endif /* LWIP_TCP */
|
||||
default:
|
||||
LWIP_ERROR("Invalid netconn type", 0, do{ msg->err = ERR_VAL; }while(0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
sys_sem_signal(&msg->conn->op_completed);
|
||||
/* For all other protocols, netconn_connect() calls TCPIP_APIMSG(),
|
||||
so use TCPIP_APIMSG_ACK() here. */
|
||||
TCPIP_APIMSG_ACK(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user