Browse Source

Fixed bug #31590: getsockopt(... SO_ERROR ...) gives EINPROGRESS after a successful nonblocking connection.

STABLE-2_1_x
goldsimon 16 years ago
parent
commit
377628216e
  1. 4
      CHANGELOG
  2. 4
      src/api/sockets.c

4
CHANGELOG

@ -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

4
src/api/sockets.c

@ -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…
Cancel
Save