sockets: Fix missing err_to_errno conversion for ERR_VAL in lwip_recvmsg

Signed-off-by: Axel Lin <axel.lin@ingics.com>
(cherry picked from commit 7bcf0d3334)
This commit is contained in:
Axel Lin 2018-11-08 22:43:51 +08:00 committed by Simon Goldschmidt
parent 2d2336014c
commit 4aa6df7633

View File

@ -1305,7 +1305,7 @@ lwip_recvmsg(int s, struct msghdr *message, int flags)
if ((message->msg_iov[i].iov_base == NULL) || ((ssize_t)message->msg_iov[i].iov_len <= 0) ||
((size_t)(ssize_t)message->msg_iov[i].iov_len != message->msg_iov[i].iov_len) ||
((ssize_t)(buflen + (ssize_t)message->msg_iov[i].iov_len) <= 0)) {
sock_set_errno(sock, ERR_VAL);
sock_set_errno(sock, err_to_errno(ERR_VAL));
done_socket(sock);
return -1;
}