]> git.ipfire.org Git - thirdparty/curl.git/commit
lib: pass in 'struct Curl_easy *' to most functions
authorDaniel Stenberg <daniel@haxx.se>
Fri, 8 Jan 2021 16:58:15 +0000 (17:58 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 17 Jan 2021 22:56:09 +0000 (23:56 +0100)
commit215db086e09665ee7af9b646ad6c4d6e281001ac
tree50c74f8456df87e86de6d72e90190a3563083a1a
parent0d26ab9ed3ac29da2a383d313e93df3e9f5295a2
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
76 files changed:
lib/asyn-ares.c
lib/asyn-thread.c
lib/c-hyper.c
lib/conncache.c
lib/conncache.h
lib/connect.c
lib/connect.h
lib/content_encoding.c
lib/curl_gssapi.c
lib/curl_rtmp.c
lib/curl_sasl.c
lib/curl_sasl.h
lib/dict.c
lib/easy.c
lib/file.c
lib/ftp.c
lib/ftp.h
lib/ftplistparser.c
lib/gopher.c
lib/hostip.c
lib/hostip.h
lib/hostip4.c
lib/hostip6.c
lib/http.c
lib/http.h
lib/http2.c
lib/http2.h
lib/http_aws_sigv4.c
lib/http_chunks.c
lib/http_proxy.c
lib/imap.c
lib/krb5.c
lib/ldap.c
lib/mqtt.c
lib/multi.c
lib/multiif.h
lib/openldap.c
lib/pingpong.c
lib/pingpong.h
lib/pop3.c
lib/pop3.h
lib/rtsp.c
lib/sendf.c
lib/sendf.h
lib/smb.c
lib/smtp.c
lib/smtp.h
lib/socks.c
lib/socks_gssapi.c
lib/socks_sspi.c
lib/telnet.c
lib/tftp.c
lib/transfer.c
lib/transfer.h
lib/url.c
lib/url.h
lib/urldata.h
lib/vquic/ngtcp2.c
lib/vquic/quiche.c
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vssh/wolfssh.c
lib/vtls/bearssl.c
lib/vtls/gskit.c
lib/vtls/gtls.c
lib/vtls/mbedtls.c
lib/vtls/mesalink.c
lib/vtls/nss.c
lib/vtls/openssl.c
lib/vtls/schannel.c
lib/vtls/sectransp.c
lib/vtls/wolfssl.c
lib/x509asn1.c
lib/x509asn1.h
tests/data/test660
tests/unit/unit1651.c