? minimal/.depend ? minimal/echop ? unixsim/.depend ? unixsim/simhost Index: unixsim/apps/shell.c =================================================================== RCS file: /sources/lwip/contrib/ports/unix/proj/unixsim/apps/shell.c,v retrieving revision 1.17 diff -u -r1.17 shell.c --- unixsim/apps/shell.c 30 Sep 2008 13:48:08 -0000 1.17 +++ unixsim/apps/shell.c 20 Jan 2010 05:30:19 -0000 @@ -679,6 +679,7 @@ com_acpt(struct command *com) { int i, j; + err_t err; /* Find the first unused connection in conns. */ for(j = 0; j < NCONNS && conns[j] != NULL; j++); @@ -699,12 +700,12 @@ return ESUCCESS; } - conns[j] = netconn_accept(conns[i]); + err = netconn_accept(conns[i], &conns[j]); - if (conns[j] == NULL) { + if (err != ERR_OK) { sendstr("Could not accept connection: ", com->conn); #ifdef LWIP_DEBUG - sendstr(lwip_strerr(netconn_err(conns[i])), com->conn); + sendstr(lwip_strerr(err), com->conn); #else sendstr("(debugging must be turned on for error message to appear)", com->conn); #endif /* LWIP_DEBUG */ @@ -806,18 +807,18 @@ return ESUCCESS; } - buf = netconn_recv(conns[i]); - if (buf != NULL) { + err = netconn_recv(conns[i], &buf); + if (err != ERR_OK) { netbuf_copy(buf, buffer, 1024); len = netbuf_len(buf); sendstr("Reading from connection:\n", com->conn); - netconn_write(com->conn, buffer, len, NETCONN_COPY); + err = netconn_write(com->conn, buffer, len, NETCONN_COPY); netbuf_delete(buf); } else { sendstr("EOF.\n", com->conn); } - err = netconn_err(conns[i]); + if (err != ERR_OK) { sendstr("Could not receive data: ", com->conn); #ifdef LWIP_DEBUG @@ -1294,12 +1295,12 @@ struct netbuf *buf; u32_t len; struct command com; - s8_t err; + err_t err; int i; do { - buf = netconn_recv(conn); - if (buf != NULL) { + err = netconn_recv(conn, &buf); + if (err != ERR_OK) { netbuf_copy(buf, buffer, 1024); len = netbuf_len(buf); netbuf_delete(buf); @@ -1332,7 +1333,7 @@ prompt(conn); } } while (buf != NULL); - printf("buf == NULL err %s\n", lwip_strerr(conn->err)); + printf("buf == NULL err %s\n", err); close: netconn_close(conn); @@ -1349,13 +1350,12 @@ shell_thread(void *arg) { struct netconn *conn, *newconn; - conn = netconn_new(NETCONN_TCP); netconn_bind(conn, NULL, 23); netconn_listen(conn); while (1) { - newconn = netconn_accept(conn); + netconn_accept(conn, &newconn); shell_main(newconn); netconn_delete(newconn); } Index: unixsim/apps/tcpecho.c =================================================================== RCS file: /sources/lwip/contrib/ports/unix/proj/unixsim/apps/tcpecho.c,v retrieving revision 1.5 diff -u -r1.5 tcpecho.c --- unixsim/apps/tcpecho.c 5 Sep 2007 16:48:13 -0000 1.5 +++ unixsim/apps/tcpecho.c 20 Jan 2010 05:30:19 -0000 @@ -51,15 +51,15 @@ while (1) { /* Grab new connection. */ - newconn = netconn_accept(conn); + err = netconn_accept(conn, &newconn); /*printf("accepted new connection %p\n", newconn);*/ /* Process the new connection. */ - if (newconn != NULL) { + if (err == ERR_OK) { struct netbuf *buf; void *data; u16_t len; - while ((buf = netconn_recv(newconn)) != NULL) { + while (netconn_recv(newconn, &buf) == ERR_OK) { /*printf("Recved\n");*/ do { netbuf_data(buf, &data, &len); Index: unixsim/apps/udpecho.c =================================================================== RCS file: /sources/lwip/contrib/ports/unix/proj/unixsim/apps/udpecho.c,v retrieving revision 1.4 diff -u -r1.4 udpecho.c --- unixsim/apps/udpecho.c 5 Sep 2007 16:48:13 -0000 1.4 +++ unixsim/apps/udpecho.c 20 Jan 2010 05:30:19 -0000 @@ -47,7 +47,7 @@ netconn_bind(conn, NULL, 7); while (1) { - buf = netconn_recv(conn); + netconn_recv(conn, &buf); addr = netbuf_fromaddr(buf); port = netbuf_fromport(buf); netconn_connect(conn, addr, port);