diff options
author | Stefan Eissing <stefan@eissing.org> | 2023-01-03 13:13:37 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-01-03 17:33:29 +0100 |
commit | 6a8d7ef9818d5f5c9bbd9bcf4ce09feaa04a1556 (patch) | |
tree | 91ef71e554b532ce00c38d27f1c31a9c8333d933 /lib/cfilters.c | |
parent | 436d63fbb18db9c91e816b27a3b9316cd7310471 (diff) | |
download | curl-6a8d7ef9818d5f5c9bbd9bcf4ce09feaa04a1556.tar.gz |
cf-socket: keep sockaddr local in the socket filters
- copy `struct Curl_addrinfo` on filter setup into context
- remove `struct Curl_addrinfoi *` with `struct Curl_sockaddr_ex *` in
connectdata that is set and NULLed by the socket filter
- this means we have no reference to the resolver info in connectdata or
its filters
- trigger the CF_CTRL_CONN_INFO_UPDATE event when the complete filter
chain reaches connected status
- update easy handle connection information on CF_CTRL_DATA_SETUP event.
Closes #10213
Diffstat (limited to 'lib/cfilters.c')
-rw-r--r-- | lib/cfilters.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/cfilters.c b/lib/cfilters.c index 092f9f1d6..7f524cdb8 100644 --- a/lib/cfilters.c +++ b/lib/cfilters.c @@ -369,10 +369,14 @@ CURLcode Curl_conn_connect(struct Curl_easy *data, cf = data->conn->cfilter[sockindex]; DEBUGASSERT(cf); + if(!cf) + return CURLE_FAILED_INIT; + *done = cf->connected; if(!*done) { - result = cf->cft->connect (cf, data, blocking, done); + result = cf->cft->connect(cf, data, blocking, done); if(!result && *done) { + Curl_conn_ev_update_info(data, data->conn); data->conn->keepalive = Curl_now(); } } |