diff --git a/apps/udpecho/udpecho.c b/apps/udpecho/udpecho.c index f2842d7..9bf2de2 100644 --- a/apps/udpecho/udpecho.c +++ b/apps/udpecho/udpecho.c @@ -43,10 +43,8 @@ static void udpecho_thread(void *arg) { - static struct netconn *conn; - static struct netbuf *buf; - static ip_addr_t *addr; - static unsigned short port; + struct netconn *conn; + struct netbuf *buf; char buffer[4096]; err_t err; LWIP_UNUSED_ARG(arg); @@ -58,8 +56,6 @@ udpecho_thread(void *arg) while (1) { err = netconn_recv(conn, &buf); if (err == ERR_OK) { - addr = netbuf_fromaddr(buf); - port = netbuf_fromport(buf); /* no need netconn_connect here, since the netbuf contains the address */ if(netbuf_copy(buf, buffer, buf->p->tot_len) != buf->p->tot_len) { LWIP_DEBUGF(LWIP_DBG_ON, ("netbuf_copy failed\n"));