conncache: remove name arg from Curl_conncache_find_bundle

To simplify, and also since the returned name is not the full actual
name used for the check. The port number and zone id is also involved,
so just showing the name is misleading.

Closes #8750
This commit is contained in:
Daniel Stenberg 2022-04-25 16:25:42 +02:00
parent 5295e8d64a
commit 030adbceeb
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 15 additions and 28 deletions

View file

@ -1123,7 +1123,6 @@ ConnectionExists(struct Curl_easy *data,
bool foundPendingCandidate = FALSE;
bool canmultiplex = IsMultiplexingPossible(data, needle);
struct connectbundle *bundle;
const char *hostbundle;
#ifdef USE_NTLM
bool wantNTLMhttp = ((data->state.authhost.want &
@ -1144,15 +1143,14 @@ ConnectionExists(struct Curl_easy *data,
/* Look up the bundle with all the connections to this particular host.
Locks the connection cache, beware of early returns! */
bundle = Curl_conncache_find_bundle(data, needle, data->state.conn_cache,
&hostbundle);
bundle = Curl_conncache_find_bundle(data, needle, data->state.conn_cache);
if(bundle) {
/* Max pipe length is zero (unlimited) for multiplexed connections */
struct Curl_llist_element *curr;
infof(data, "Found bundle for host %s: %p [%s]",
hostbundle, (void *)bundle, (bundle->multiuse == BUNDLE_MULTIPLEX ?
"can multiplex" : "serially"));
infof(data, "Found bundle for host: %p [%s]",
(void *)bundle, (bundle->multiuse == BUNDLE_MULTIPLEX ?
"can multiplex" : "serially"));
/* We can't multiplex if we don't know anything about the server */
if(canmultiplex) {
@ -3955,10 +3953,8 @@ static CURLcode create_conn(struct Curl_easy *data,
connections_available = FALSE;
else {
/* this gets a lock on the conncache */
const char *bundlehost;
struct connectbundle *bundle =
Curl_conncache_find_bundle(data, conn, data->state.conn_cache,
&bundlehost);
Curl_conncache_find_bundle(data, conn, data->state.conn_cache);
if(max_host_connections > 0 && bundle &&
(bundle->num_connections >= max_host_connections)) {
@ -3971,8 +3967,8 @@ static CURLcode create_conn(struct Curl_easy *data,
if(conn_candidate)
Curl_disconnect(data, conn_candidate, FALSE);
else {
infof(data, "No more connections allowed to host %s: %zu",
bundlehost, max_host_connections);
infof(data, "No more connections allowed to host: %zu",
max_host_connections);
connections_available = FALSE;
}
}