Fix bug #20480: Check the pcb passed to tcp_listen() for the correct state (must be CLOSED).

This commit is contained in:
goldsimon
2007-07-24 07:41:55 +00:00
parent ebcb46cd48
commit 62c3de30b9
3 changed files with 22 additions and 12 deletions

View File

@@ -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;