diff --git a/CHANGELOG b/CHANGELOG index 1b37e2c2..4960b1d2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -23,6 +23,9 @@ HISTORY ++ New features: + 2007-04-05 Frédéric Bernon + * sockets.c: remplace ENOBUFS errors on alloc_socket by ENFILE to be more BSD compliant. + 2007-04-04 Simon Goldschmidt * arch.h, api_msg.c, dhcp.c, msg_in.c, sockets.c: Introduced #define LWIP_UNUSED_ARG(x) use this for and architecture-independent form to tell the compiler you intentionally diff --git a/src/api/sockets.c b/src/api/sockets.c index 02afc7da..d003c62d 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -196,7 +196,7 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) newsock = alloc_socket(newconn); if (newsock == -1) { netconn_delete(newconn); - sock_set_errno(sock, ENOBUFS); + sock_set_errno(sock, ENFILE); return -1; } newconn->callback = event_callback; @@ -585,7 +585,7 @@ lwip_socket(int domain, int type, int protocol) if (i == -1) { netconn_delete(conn); - set_errno(ENOBUFS); + set_errno(ENFILE); return -1; } conn->socket = i;