diff --git a/CHANGELOG b/CHANGELOG index 94df85e7..cd7a5bc2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -96,8 +96,11 @@ HISTORY ++ Bugfixes: + 2014-02-27: Simon Goldschmidt + * sockets.c: fixed bug #41729 Some socket functions return Exyz instead of -1 + 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 * pbuf.c: fixed bug #39356 Wrong increment in pbuf_memfind() diff --git a/src/api/sockets.c b/src/api/sockets.c index a298869d..9f65d736 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -612,7 +612,7 @@ lwip_listen(int s, int backlog) LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_listen(%d) failed, err=%d\n", s, err)); if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { sock_set_errno(sock, EOPNOTSUPP); - return EOPNOTSUPP; + return -1; } sock_set_errno(sock, err_to_errno(err)); return -1; @@ -1447,11 +1447,11 @@ lwip_shutdown(int s, int how) if (sock->conn != NULL) { if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { sock_set_errno(sock, EOPNOTSUPP); - return EOPNOTSUPP; + return -1; } } else { sock_set_errno(sock, ENOTCONN); - return ENOTCONN; + return -1; } if (how == SHUT_RD) { @@ -1463,7 +1463,7 @@ lwip_shutdown(int s, int how) shut_tx = 1; } else { sock_set_errno(sock, EINVAL); - return EINVAL; + return -1; } err = netconn_shutdown(sock->conn, shut_rx, shut_tx);