summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_conn.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-07-31 21:24:20 +0200
committerRichard Levitte <levitte@openssl.org>2019-08-02 11:41:54 +0200
commitff988500c2f39ae61b2836167b6e0e7b2021220c (patch)
treeead6acf74e2cf8c8be430e02f78dddcf8281b0cc /crypto/bio/bss_conn.c
parentUse NULL as parameter when pointer can only be NULL. (diff)
downloadopenssl-ff988500c2f39ae61b2836167b6e0e7b2021220c.tar.xz
openssl-ff988500c2f39ae61b2836167b6e0e7b2021220c.zip
Replace FUNCerr with ERR_raise_data
Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9496)
Diffstat (limited to 'crypto/bio/bss_conn.c')
-rw-r--r--crypto/bio/bss_conn.c21
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;