fix printing of recved packet.Discovered by Ed Sutter

This commit is contained in:
jani 2003-01-16 13:09:19 +00:00
parent fa8f6cb204
commit 07af438a38

View File

@ -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);
}