sockets.c: remplace ENOBUFS errors on alloc_socket by ENFILE to be more BSD compliant.

This commit is contained in:
fbernon 2007-04-05 16:49:33 +00:00
parent f16911f7dd
commit 7fdd312cca
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

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