lwip_accept: fixed returning EOPNOTSUPP instead of -1 (EOPNOTSUPP is set as socket error)

This commit is contained in:
goldsimon 2016-03-23 14:27:40 +01:00
parent 449fc98a55
commit 85d5fbdc7f

View File

@ -514,7 +514,7 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): netconn_acept 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;