restore the original way of determining the connections hostname

This commit is contained in:
Stefan Eissing 2025-07-10 12:53:49 +02:00
parent 714ca12244
commit 5f883ec9e9
No known key found for this signature in database

View file

@ -540,11 +540,20 @@ static void multi_done_locked(struct connectdata *conn,
{
struct multi_done_ctx *mdctx = userdata;
#ifndef CURL_DISABLE_VERBOSE_STRINGS
const char *host = NULL;
int port = 0;
if(Curl_trc_is_verbose(data))
Curl_conn_get_current_host(data, FIRSTSOCKET, &host, &port);
const char *host =
#ifndef CURL_DISABLE_PROXY
conn->bits.socksproxy ?
conn->socks_proxy.host.dispname :
conn->bits.httpproxy ? conn->http_proxy.host.dispname :
#endif
conn->bits.conn_to_host ? conn->conn_to_host.dispname :
conn->host.dispname;
int port =
#ifndef CURL_DISABLE_PROXY
conn->bits.httpproxy ? conn->http_proxy.port :
#endif
conn->bits.conn_to_port ? conn->conn_to_port :
conn->remote_port;
#endif
Curl_detach_connection(data);