mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-26 01:57:01 +08:00
Fix bug #20480: Check the pcb passed to tcp_listen() for the correct state (must be CLOSED).
This commit is contained in:
@@ -343,6 +343,8 @@ tcp_listen(struct tcp_pcb *pcb)
|
||||
{
|
||||
struct tcp_pcb_listen *lpcb;
|
||||
|
||||
LWIP_ERROR("pcb not already connected", pcb->state == CLOSED, return NULL);
|
||||
|
||||
/* already listening? */
|
||||
if (pcb->state == LISTEN) {
|
||||
return pcb;
|
||||
|
||||
Reference in New Issue
Block a user