mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-10 21:40:29 +00:00
sockets.c: remplace ENOBUFS errors on alloc_socket by ENFILE to be more BSD compliant.
This commit is contained in:
parent
f16911f7dd
commit
7fdd312cca
@ -23,6 +23,9 @@ HISTORY
|
|||||||
|
|
||||||
++ New features:
|
++ 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
|
2007-04-04 Simon Goldschmidt
|
||||||
* arch.h, api_msg.c, dhcp.c, msg_in.c, sockets.c: Introduced #define LWIP_UNUSED_ARG(x)
|
* 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
|
use this for and architecture-independent form to tell the compiler you intentionally
|
||||||
|
@ -196,7 +196,7 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
|
|||||||
newsock = alloc_socket(newconn);
|
newsock = alloc_socket(newconn);
|
||||||
if (newsock == -1) {
|
if (newsock == -1) {
|
||||||
netconn_delete(newconn);
|
netconn_delete(newconn);
|
||||||
sock_set_errno(sock, ENOBUFS);
|
sock_set_errno(sock, ENFILE);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
newconn->callback = event_callback;
|
newconn->callback = event_callback;
|
||||||
@ -585,7 +585,7 @@ lwip_socket(int domain, int type, int protocol)
|
|||||||
|
|
||||||
if (i == -1) {
|
if (i == -1) {
|
||||||
netconn_delete(conn);
|
netconn_delete(conn);
|
||||||
set_errno(ENOBUFS);
|
set_errno(ENFILE);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
conn->socket = i;
|
conn->socket = i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user