Minor fixs to reduce footprint on the "recv part" of Sequential API...

This commit is contained in:
fbernon
2007-05-19 13:54:56 +00:00
parent c899097802
commit 6bfa99a774
2 changed files with 6 additions and 2 deletions

View File

@@ -437,7 +437,7 @@ lwip_recvfrom(int s, void *mem, int len, unsigned int flags,
/* If this is a TCP socket, check if there is data left in the
buffer. If so, it should be saved in the sock structure for next
time around. */
if (netconn_type(sock->conn) == NETCONN_TCP && buflen - copylen > 0) {
if ((sock->conn->type == NETCONN_TCP) && (buflen - copylen > 0)) {
sock->lastdata = buf;
sock->lastoffset += copylen;
} else {
@@ -480,7 +480,7 @@ lwip_send(int s, const void *data, int size, unsigned int flags)
#else
sock_set_errno(sock, err_to_errno(ERR_ARG));
return -1;
#endif
#endif /* (LWIP_UDP || LWIP_RAW) */
err = netconn_write( sock->conn, data, size, NETCONN_COPY);