diff options
Diffstat (limited to 'crypto/bio/bss_conn.c')
-rw-r--r-- | crypto/bio/bss_conn.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 330c64f818..56fb392c61 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -138,10 +138,9 @@ static int conn_state(BIO *b, BIO_CONNECT *c) BIO_ADDRINFO_socktype(c->addr_iter), BIO_ADDRINFO_protocol(c->addr_iter), 0); if (ret == (int)INVALID_SOCKET) { - FUNCerr("socket", get_last_socket_error()); - ERR_add_error_data(4, - "hostname=", c->param_hostname, - " service=", c->param_service); + ERR_raise_data(ERR_LIB_SYS, get_last_socket_error(), + "calling socket(%s, %s)", + c->param_hostname, c->param_service); BIOerr(BIO_F_CONN_STATE, BIO_R_UNABLE_TO_CREATE_SOCKET); goto exit_loop; } @@ -170,10 +169,9 @@ static int conn_state(BIO *b, BIO_CONNECT *c) ERR_clear_error(); break; } else { - FUNCerr("connect", get_last_socket_error()); - ERR_add_error_data(4, - "hostname=", c->param_hostname, - " service=", c->param_service); + ERR_raise_data(ERR_LIB_SYS, get_last_socket_error(), + "calling connect(%s, %s)", + c->param_hostname, c->param_service); BIOerr(BIO_F_CONN_STATE, BIO_R_CONNECT_ERROR); } goto exit_loop; @@ -186,10 +184,9 @@ static int conn_state(BIO *b, BIO_CONNECT *c) i = BIO_sock_error(b->num); if (i) { BIO_clear_retry_flags(b); - FUNCerr("connect", i); - ERR_add_error_data(4, - "hostname=", c->param_hostname, - " service=", c->param_service); + ERR_raise_data(ERR_LIB_SYS, i, + "calling connect(%s, %s)", + c->param_hostname, c->param_service); BIOerr(BIO_F_CONN_STATE, BIO_R_NBIO_CONNECT_ERROR); ret = 0; goto exit_loop; |