Removed tabs, added netconn_close().

This commit is contained in:
christiaans 2006-02-28 08:23:22 +00:00
parent 171676162e
commit f01fa48eec

View File

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