mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 04:54:38 +08:00
fix printing of recved packet.Discovered by Ed Sutter
This commit is contained in:
parent
fa8f6cb204
commit
07af438a38
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user