Make udp_disconnect() clear its remote address association.

This commit is contained in:
likewise
2004-03-11 20:45:09 +00:00
parent 79c7a7a43d
commit bfdf19f56c
3 changed files with 10 additions and 0 deletions

View File

@@ -703,6 +703,10 @@ udp_connect(struct udp_pcb *pcb, struct ip_addr *ipaddr, u16_t port)
void
udp_disconnect(struct udp_pcb *pcb)
{
/* reset remote address association */
ip_addr_set(&pcb->remote_ip, IP_ADDR_ANY);
pcb->remote_port = 0;
/* mark PCB as unconnected */
pcb->flags &= ~UDP_FLAGS_CONNECTED;
}

View File

@@ -59,6 +59,7 @@ typedef s8_t err_t;
#define ERR_USE -10 /* Address in use. */
#define ERR_IF -11 /* Low-level netif error */
#define ERR_ISCONN -12 /* Already connected. */
#ifdef LWIP_DEBUG