Remove a lot of conn->data uses#6425
Closed
bagder wants to merge 1 commit into
Closed
Conversation
24fc44b to
a5f9a6f
Compare
bbdcb78 to
5c867e7
Compare
bagder
added a commit
that referenced
this pull request
Jan 11, 2021
1. We mostly operate on transfers and not connections 2. We should avoid "conn->data" Closes #6425
6c86ef2 to
f79ba42
Compare
db008a7 to
de522aa
Compare
bagder
added a commit
that referenced
this pull request
Jan 12, 2021
1. We mostly operate on transfers and not connections 2. We should avoid "conn->data" Closes #6425
de522aa to
63db91d
Compare
bagder
added a commit
that referenced
this pull request
Jan 14, 2021
1. We mostly operate on transfers and not connections 2. We should avoid "conn->data" Closes #6425
01ef54b to
08af194
Compare
... 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
54a1731 to
d0cceac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See https://github.com/curl/curl/wiki/conn.data-considered-bad
At 367 instances left after this PR (down from 917 in master).