From c43ab76bbefbcc49689a96260506dbf41e21ace9 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 29 May 2007 11:02:53 +0000 Subject: [PATCH] Use TCP_RMV instead of tcp_pcb_remove when removing pcbs from tcp_bound_pcbs list (bug introduced while fixing bug #1895) --- src/core/tcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/tcp.c b/src/core/tcp.c index 8a682b56..2c5a5115 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -134,7 +134,7 @@ tcp_close(struct tcp_pcb *pcb) * is erroneous, but this should never happen as the pcb has in those cases * been freed, and so any remaining handles are bogus. */ err = ERR_OK; - tcp_pcb_remove(&tcp_bound_pcbs, pcb); + TCP_RMV(&tcp_bound_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); pcb = NULL; break; @@ -333,7 +333,7 @@ tcp_listen(struct tcp_pcb *pcb) lpcb->ttl = pcb->ttl; lpcb->tos = pcb->tos; ip_addr_set(&lpcb->local_ip, &pcb->local_ip); - tcp_pcb_remove(&tcp_bound_pcbs, pcb); + TCP_RMV(&tcp_bound_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); #if LWIP_CALLBACK_API lpcb->accept = tcp_accept_null; @@ -459,7 +459,7 @@ tcp_connect(struct tcp_pcb *pcb, struct ip_addr *ipaddr, u16_t port, #if LWIP_CALLBACK_API pcb->connected = connected; #endif /* LWIP_CALLBACK_API */ - tcp_pcb_remove(&tcp_bound_pcbs, pcb); + TCP_RMV(&tcp_bound_pcbs, pcb); TCP_REG(&tcp_active_pcbs, pcb); snmp_inc_tcpactiveopens();