mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
Fixed bug #31590: getsockopt(... SO_ERROR ...) gives EINPROGRESS after a successful nonblocking connection.
This commit is contained in:
parent
f7627929d5
commit
377628216e
@ -233,6 +233,10 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2010-11-20: Simon Goldschmidt
|
||||
* sockets.c: Fixed bug #31590: getsockopt(... SO_ERROR ...) gives EINPROGRESS
|
||||
after a successful nonblocking connection.
|
||||
|
||||
2010-11-20: Simon Goldschmidt
|
||||
* etharp.c: Fixed bug #31722: IP packets sent with an AutoIP source addr
|
||||
must be sent link-local
|
||||
|
@ -1701,8 +1701,8 @@ lwip_getsockopt_internal(void *arg)
|
||||
break;
|
||||
|
||||
case SO_ERROR:
|
||||
/* only overwrite if ERR_OK before */
|
||||
if (sock->err == 0) {
|
||||
/* only overwrite ERR_OK or tempoary errors */
|
||||
if ((sock->err == 0) || (sock->err == EINPROGRESS)) {
|
||||
sock_set_errno(sock, err_to_errno(sock->conn->last_err));
|
||||
}
|
||||
*(int *)optval = sock->err;
|
||||
|
Loading…
Reference in New Issue
Block a user