To whom it concerns:

Around line 524 of core/tcp.c, in tcp_listen_with_backlog(struct tcp_pcb
*pcb, u8_t backlog):

  LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED,
return NULL);

  /* already listening? */
  if (pcb->state == LISTEN) {
    return pcb;
  }

A pcb->state == LISTEN never makes it past the LWIP_ERROR. Put the check
for the LISTEN state above the LWIP_ERROR.

I am surprised anyone gets tcp_listen() to work at all for the raw API with
this bug.

Cheers,
Joe Gorse

C: 440-552-0730
LI: Joe Gorse <http://www.linkedin.com/pub/joe-gorse/7/12/397>
FB: jhgiv <https://www.facebook.com/jhgiv>
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to