mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-13 06:37:25 +00: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);
|
addr = netbuf_fromaddr(buf);
|
||||||
port = netbuf_fromport(buf);
|
port = netbuf_fromport(buf);
|
||||||
netconn_connect(conn, addr, port);
|
netconn_connect(conn, addr, port);
|
||||||
|
netbuf_copy(buf, buffer, buf->p->tot_len);
|
||||||
|
buffer[buf->p->tot_len] = '\0';
|
||||||
netconn_send(conn, buf);
|
netconn_send(conn, buf);
|
||||||
netbuf_copy(buf, buffer, sizeof(buffer));
|
|
||||||
printf("got %s\n", buffer);
|
printf("got %s\n", buffer);
|
||||||
netbuf_delete(buf);
|
netbuf_delete(buf);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user