mirror of
https://github.com/apache/nuttx.git
synced 2026-09-28 03:09:13 +08:00
psock_send() no longer sets errno, so send() must now set it.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user