mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-25 01:27:05 +08:00
Allow backlog to be updated
This commit adds support to the sockets and netconn layer to update the backlog by calling listen when the netconn is already in the listen state. When backlog is not enabled, the call returns successfully This commit also introduces a macro for setting the backlog value that prevents a 0 sized (invalid) backlog
This commit is contained in:
@@ -587,7 +587,7 @@ tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog)
|
||||
#endif /* LWIP_CALLBACK_API */
|
||||
#if TCP_LISTEN_BACKLOG
|
||||
lpcb->accepts_pending = 0;
|
||||
lpcb->backlog = (backlog ? backlog : 1);
|
||||
tcp_backlog_set(lpcb, backlog);
|
||||
#endif /* TCP_LISTEN_BACKLOG */
|
||||
TCP_REG(&tcp_listen_pcbs.pcbs, (struct tcp_pcb *)lpcb);
|
||||
return (struct tcp_pcb *)lpcb;
|
||||
|
||||
Reference in New Issue
Block a user