Socket now displays what address it is connecting to

CLA: trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16392)
This commit is contained in:
Zengit 2021-08-24 05:06:04 +03:00 committed by Pauli
parent a04b06573e
commit 994fa5f986
1 changed files with 2 additions and 0 deletions

View File

@ -172,6 +172,8 @@ int init_client(int *sock, const char *host, const char *port,
break;
}
BIO_printf(bio_out, "Connecting to %s\n", BIO_ADDR_hostname_string(BIO_ADDRINFO_address(ai), 1));
if (*sock == INVALID_SOCKET) {
if (bindaddr != NULL && !found) {
BIO_printf(bio_err, "Can't bind %saddress for %s%s%s\n",