mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-08-28 03:29:01 +00:00
Removed tabs, added netconn_close().
This commit is contained in:
parent
171676162e
commit
f01fa48eec
@ -60,18 +60,21 @@ tcpecho_thread(void *arg)
|
|||||||
u16_t len;
|
u16_t len;
|
||||||
|
|
||||||
while ((buf = netconn_recv(newconn)) != NULL) {
|
while ((buf = netconn_recv(newconn)) != NULL) {
|
||||||
/*printf("Recved\n");*/
|
/*printf("Recved\n");*/
|
||||||
do {
|
do {
|
||||||
netbuf_data(buf, &data, &len);
|
netbuf_data(buf, &data, &len);
|
||||||
err = netconn_write(newconn, data, len, NETCONN_COPY);
|
err = netconn_write(newconn, data, len, NETCONN_COPY);
|
||||||
if (err != ERR_OK) {
|
#if 0
|
||||||
/* printf("tcpecho: netconn_write: error \"%s\"\n", lwip_strerr(err));*/
|
if (err != ERR_OK) {
|
||||||
}
|
printf("tcpecho: netconn_write: error \"%s\"\n", lwip_strerr(err));
|
||||||
} while (netbuf_next(buf) >= 0);
|
}
|
||||||
netbuf_delete(buf);
|
#endif
|
||||||
|
} while (netbuf_next(buf) >= 0);
|
||||||
|
netbuf_delete(buf);
|
||||||
}
|
}
|
||||||
/*printf("Got EOF, looping\n");*/
|
/*printf("Got EOF, looping\n");*/
|
||||||
/* Close connection and discard connection identifier. */
|
/* Close connection and discard connection identifier. */
|
||||||
|
netconn_close(newconn);
|
||||||
netconn_delete(newconn);
|
netconn_delete(newconn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user