mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
minor: move assert to a slightly better place
This commit is contained in:
parent
240cf62056
commit
a3fc38037a
@ -828,16 +828,15 @@ tcp_process(struct tcp_pcb *pcb)
|
||||
pcb->state = ESTABLISHED;
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
|
||||
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
|
||||
#if LWIP_CALLBACK_API
|
||||
LWIP_ASSERT("pcb->listener->accept != NULL",
|
||||
(pcb->listener == NULL) || (pcb->listener->accept != NULL));
|
||||
#endif
|
||||
if (pcb->listener == NULL) {
|
||||
/* listen pcb might be closed by now */
|
||||
err = ERR_VAL;
|
||||
} else
|
||||
#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */
|
||||
{
|
||||
#if LWIP_CALLBACK_API
|
||||
LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL);
|
||||
#endif
|
||||
tcp_backlog_accepted(pcb);
|
||||
/* Call the accept function. */
|
||||
TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
|
||||
|
Loading…
Reference in New Issue
Block a user