Merged patch #927 which fixes "needs modifiable lvalue" compile error in TCP_REG.

This commit is contained in:
likewise 2003-01-08 15:37:20 +00:00
parent a528a2323e
commit 5e13d495f0
2 changed files with 2 additions and 8 deletions

View File

@ -312,14 +312,7 @@ tcp_listen(struct tcp_pcb *pcb)
#if LWIP_CALLBACK_API #if LWIP_CALLBACK_API
lpcb->accept = tcp_accept_null; lpcb->accept = tcp_accept_null;
#endif /* LWIP_CALLBACK_API */ #endif /* LWIP_CALLBACK_API */
/* workaround for compile error: assignment requires modifiable lvalue in TCP_REG */ TCP_REG(&tcp_listen_pcbs, lpcb);
#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
return (struct tcp_pcb *)lpcb; return (struct tcp_pcb *)lpcb;
} }
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/

View File

@ -417,6 +417,7 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
tcp_tmp_pcb = tcp_tmp_pcb->next) { \ tcp_tmp_pcb = tcp_tmp_pcb->next) { \
ASSERT("TCP_REG: already registered\n", tcp_tmp_pcb != npcb); \ 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); \ ASSERT("TCP_REG: pcb->state != CLOSED", npcb->state != CLOSED); \
npcb->next = *pcbs; \ npcb->next = *pcbs; \
ASSERT("TCP_REG: npcb->next != npcb", npcb->next != npcb); \ ASSERT("TCP_REG: npcb->next != npcb", npcb->next != npcb); \