psock_send() no longer sets errno, so send() must now set it.

This commit is contained in:
Gregory Nutt 2017-09-30 06:27:37 -06:00
parent ad369a0bad
commit 6c5f254a5b
1 changed files with 6 additions and 0 deletions

View File

@ -224,6 +224,12 @@ ssize_t send(int sockfd, FAR const void *buf, size_t len, int flags)
/* And let psock_send do all of the work */
ret = psock_send(psock, buf, len, flags);
if (ret < 0)
{
set_errno((int)-ret);
ret = ERROR;
}
leave_cancellation_point();
return ret;
}