Fixed bug #3112 (faulty behaviour calling tcp_listen() when already listening)

This commit is contained in:
likewise 2003-04-06 20:35:50 +00:00
parent 0418edb7b6
commit 12fc0239c2

View File

@ -312,6 +312,10 @@ tcp_listen(struct tcp_pcb *pcb)
{
struct tcp_pcb_listen *lpcb;
/* already listening? */
if(pcb->state == LISTEN) {
return pcb;
}
lpcb = memp_malloc(MEMP_TCP_PCB_LISTEN);
if(lpcb == NULL) {
return NULL;