summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/connect.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2024-03-27 16:04:05 +0300
committerdartraiden <wowemuh@gmail.com>2024-03-27 16:04:05 +0300
commit26b7f4e979561aa1f17d6719fc1dad91e1a5d1b4 (patch)
tree98aafdc421d93e855ddc886fe56e9e084f992ac8 /libs/libcurl/src/connect.c
parent9be45ab3f9c03107dfb717798e41dda72576122d (diff)
libcurl: update to 8.7.1
Diffstat (limited to 'libs/libcurl/src/connect.c')
-rw-r--r--libs/libcurl/src/connect.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/libs/libcurl/src/connect.c b/libs/libcurl/src/connect.c
index eccdc4a7db..c391b0d99b 100644
--- a/libs/libcurl/src/connect.c
+++ b/libs/libcurl/src/connect.c
@@ -94,7 +94,7 @@
* infinite time left). If the value is negative, the timeout time has already
* elapsed.
* @param data the transfer to check on
- * @param nowp timestamp to use for calculdation, NULL to use Curl_now()
+ * @param nowp timestamp to use for calculation, NULL to use Curl_now()
* @param duringconnect TRUE iff connect timeout is also taken into account.
* @unittest: 1303
*/
@@ -145,19 +145,26 @@ timediff_t Curl_timeleft(struct Curl_easy *data,
/* Copies connection info into the transfer handle to make it available when
the transfer handle is no longer associated with the connection. */
void Curl_persistconninfo(struct Curl_easy *data, struct connectdata *conn,
- char *local_ip, int local_port)
+ struct ip_quadruple *ip)
{
- memcpy(data->info.conn_primary_ip, conn->primary_ip, MAX_IPADR_LEN);
- if(local_ip && local_ip[0])
- memcpy(data->info.conn_local_ip, local_ip, MAX_IPADR_LEN);
- else
- data->info.conn_local_ip[0] = 0;
+ if(ip)
+ data->info.primary = *ip;
+ else {
+ memset(&data->info.primary, 0, sizeof(data->info.primary));
+ data->info.primary.remote_port = -1;
+ data->info.primary.local_port = -1;
+ }
data->info.conn_scheme = conn->handler->scheme;
/* conn_protocol can only provide "old" protocols */
data->info.conn_protocol = (conn->handler->protocol) & CURLPROTO_MASK;
- data->info.conn_primary_port = conn->port;
data->info.conn_remote_port = conn->remote_port;
- data->info.conn_local_port = local_port;
+ data->info.used_proxy =
+#ifdef CURL_DISABLE_PROXY
+ 0
+#else
+ conn->bits.proxy
+#endif
+ ;
}
static const struct Curl_addrinfo *
@@ -721,7 +728,7 @@ evaluate:
failf(data, "Failed to connect to %s port %u after "
"%" CURL_FORMAT_TIMEDIFF_T " ms: %s",
- hostname, conn->port,
+ hostname, conn->primary.remote_port,
Curl_timediff(now, data->progress.t_startsingle),
curl_easy_strerror(result));
@@ -911,7 +918,7 @@ static CURLcode cf_he_connect(struct Curl_cfilter *cf,
if(cf->conn->handler->protocol & PROTO_FAMILY_SSH)
Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
- Curl_verboseconnect(data, cf->conn);
+ Curl_verboseconnect(data, cf->conn, cf->sockindex);
data->info.numconnects++; /* to track the # of connections made */
}
break;