Joe Gorse <[email protected]> wrote: > 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.
You are not supposed to call tcp_listen twice on the same pcb, so everyone "get it to work at all" by not doing that :) -uwe _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
