mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
This change implements the SO_ERROR socket option that is used to obtain the last error reported by the network.
Squashed commit of the following: Author: Gregory Nutt <gnutt@nuttx.org> net/: Trivial changes to PR from review. Biggest difference: type of s_error changed to int16_t to save a byte or two. Author: liuhuahang <liuhuahang@xiaomi.com> Implement SO_ERROR for getsockopt()
This commit is contained in:
+1
-1
@@ -159,7 +159,7 @@ int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
|
||||
ret = psock_bind(psock, addr, addrlen);
|
||||
if (ret < 0)
|
||||
{
|
||||
set_errno(-ret);
|
||||
_SO_SETERRNO(psock, -ret);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user