mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-07 08:46:36 +08:00
fix printing of recved packet.Discovered by Ed Sutter
This commit is contained in:
@@ -51,8 +51,9 @@ udpecho_thread(void *arg)
|
||||
addr = netbuf_fromaddr(buf);
|
||||
port = netbuf_fromport(buf);
|
||||
netconn_connect(conn, addr, port);
|
||||
netbuf_copy(buf, buffer, buf->p->tot_len);
|
||||
buffer[buf->p->tot_len] = '\0';
|
||||
netconn_send(conn, buf);
|
||||
netbuf_copy(buf, buffer, sizeof(buffer));
|
||||
printf("got %s\n", buffer);
|
||||
netbuf_delete(buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user