mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-10 07:13:59 +00:00
Partial fix for bug# 20147: "getsockopt() with SO_ERROR option" 'socket layer error is not updated if no operation on netconn).
This commit is contained in:
parent
046a270156
commit
ab4b59afb9
@ -1204,6 +1204,9 @@ static void lwip_getsockopt_internal(void *arg)
|
||||
break;
|
||||
|
||||
case SO_ERROR:
|
||||
if (sock->err == 0) {
|
||||
sock_set_errno(sock, err_to_errno(sock->conn->err));
|
||||
}
|
||||
*(int *)optval = sock->err;
|
||||
sock->err = 0;
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, SO_ERROR) = %d\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user