From 215db086e09665ee7af9b646ad6c4d6e281001ac Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 8 Jan 2021 17:58:15 +0100 Subject: lib: pass in 'struct Curl_easy *' to most functions ... in most cases instead of 'struct connectdata *' but in some cases in addition to. - We mostly operate on transfers and not connections. - We need the transfer handle to log, store data and more. Everything in libcurl is driven by a transfer (the CURL * in the public API). - This work clarifies and separates the transfers from the connections better. - We should avoid "conn->data". Since individual connections can be used by many transfers when multiplexing, making sure that conn->data points to the current and correct transfer at all times is difficult and has been notoriously error-prone over the years. The goal is to ultimately remove the conn->data pointer for this reason. Closes #6425 --- lib/hostip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/hostip.c') diff --git a/lib/hostip.c b/lib/hostip.c index eaa0bdbc3..a3f6090ab 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -565,7 +565,7 @@ enum resolve_t Curl_resolv(struct connectdata *conn, if(!addr) { /* Check what IP specifics the app has requested and if we can provide * it. If not, bail out. */ - if(!Curl_ipvalid(conn)) + if(!Curl_ipvalid(data, conn)) return CURLRESOLV_ERROR; if(allowDOH && data->set.doh && !ipnum) { -- cgit v1.2.1