curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: considered bad

From: Daniel Stenberg via curl-library <>
Date: Tue, 26 Jan 2021 16:05:35 +0100 (CET)

On Fri, 8 Jan 2021, Daniel Stenberg via curl-library wrote:

> Status: there are 939 current uses of this pointer

We're down to 40 references left and I'm going to let the last few ones remain
over this next release and remove the pointer from the connectdata struct
completely in the beginining of the next release cycle.

There are two somewhat complicated changes left:

  - OpenSSL:

The OpenSSL logging callback is set per connection context and we set a
callback argument that is a 'connectdata *' now. I tried to change this to
'Curl_easy *' and update it as soon as we use OpenSSL, but we could then end
up with getting the wrong pointer passed to the callback, possibly because
OpenSSL stores the pointer before we update it. So we need to invent a
work-around. 'conn->data' like, but for OpenSSL private use.

  - HTTP/2:

Very similar to the OpenSSL problem, we set callbacks and a context argument
that is bound to the connection. We cannot set a 'Curl_easy *' there becaused
we don't have that function universally, and we probably risk the same problem
as I saw in the OpenSSL case. A work-around is provided. 'conn->data' like,
but for nghttp2 private use.

Once those two have landed the remaining few should be easy to fix.

Thanks a bunch to Patrick Monnerat who helped a lot on this rather major

log of some of the changes we've done:

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
Received on 2021-01-26