mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-07-05 04:18:49 +00:00
fixed bug #41729 Some socket functions return Exyz instead of -1
This commit is contained in:
parent
8558fa0bcf
commit
2666d6df90
|
@ -96,8 +96,11 @@ HISTORY
|
||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2014-02-27: Simon Goldschmidt
|
||||||
|
* sockets.c: fixed bug #41729 Some socket functions return Exyz instead of -1
|
||||||
|
|
||||||
2014-02-25: Simon Goldschmidt
|
2014-02-25: Simon Goldschmidt
|
||||||
ip4.c: fixed bug #39514 ip_route() may return an IPv6-only interface
|
* ip4.c: fixed bug #39514 ip_route() may return an IPv6-only interface
|
||||||
|
|
||||||
2014-02-25: Simon Goldschmidt, patch by Fatih Asici
|
2014-02-25: Simon Goldschmidt, patch by Fatih Asici
|
||||||
* pbuf.c: fixed bug #39356 Wrong increment in pbuf_memfind()
|
* pbuf.c: fixed bug #39356 Wrong increment in pbuf_memfind()
|
||||||
|
|
|
@ -612,7 +612,7 @@ lwip_listen(int s, int backlog)
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_listen(%d) failed, err=%d\n", s, err));
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_listen(%d) failed, err=%d\n", s, err));
|
||||||
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
|
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
|
||||||
sock_set_errno(sock, EOPNOTSUPP);
|
sock_set_errno(sock, EOPNOTSUPP);
|
||||||
return EOPNOTSUPP;
|
return -1;
|
||||||
}
|
}
|
||||||
sock_set_errno(sock, err_to_errno(err));
|
sock_set_errno(sock, err_to_errno(err));
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1447,11 +1447,11 @@ lwip_shutdown(int s, int how)
|
||||||
if (sock->conn != NULL) {
|
if (sock->conn != NULL) {
|
||||||
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
|
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
|
||||||
sock_set_errno(sock, EOPNOTSUPP);
|
sock_set_errno(sock, EOPNOTSUPP);
|
||||||
return EOPNOTSUPP;
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sock_set_errno(sock, ENOTCONN);
|
sock_set_errno(sock, ENOTCONN);
|
||||||
return ENOTCONN;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (how == SHUT_RD) {
|
if (how == SHUT_RD) {
|
||||||
|
@ -1463,7 +1463,7 @@ lwip_shutdown(int s, int how)
|
||||||
shut_tx = 1;
|
shut_tx = 1;
|
||||||
} else {
|
} else {
|
||||||
sock_set_errno(sock, EINVAL);
|
sock_set_errno(sock, EINVAL);
|
||||||
return EINVAL;
|
return -1;
|
||||||
}
|
}
|
||||||
err = netconn_shutdown(sock->conn, shut_rx, shut_tx);
|
err = netconn_shutdown(sock->conn, shut_rx, shut_tx);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user