mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-15 18:40:05 +00:00
Merged patch #927 which fixes "needs modifiable lvalue" compile error in TCP_REG.
This commit is contained in:
parent
a528a2323e
commit
5e13d495f0
@ -312,14 +312,7 @@ tcp_listen(struct tcp_pcb *pcb)
|
||||
#if LWIP_CALLBACK_API
|
||||
lpcb->accept = tcp_accept_null;
|
||||
#endif /* LWIP_CALLBACK_API */
|
||||
/* workaround for compile error: assignment requires modifiable lvalue in TCP_REG */
|
||||
#if LWIP_TCP_REG_COMPILE_ERROR
|
||||
/* place this pcb at the start the "listening pcbs" list */
|
||||
lpcb->next = tcp_listen_pcbs;
|
||||
tcp_listen_pcbs = lpcb;
|
||||
#else
|
||||
TCP_REG((struct tcp_pcb **)&tcp_listen_pcbs, (struct tcp_pcb *)lpcb);
|
||||
#endif
|
||||
TCP_REG(&tcp_listen_pcbs, lpcb);
|
||||
return (struct tcp_pcb *)lpcb;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
@ -417,6 +417,7 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
|
||||
tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
||||
ASSERT("TCP_REG: already registered\n", tcp_tmp_pcb != npcb); \
|
||||
} \
|
||||
/* TODO: state field doesn't exist in listen pcbs */ \
|
||||
ASSERT("TCP_REG: pcb->state != CLOSED", npcb->state != CLOSED); \
|
||||
npcb->next = *pcbs; \
|
||||
ASSERT("TCP_REG: npcb->next != npcb", npcb->next != npcb); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user