Remove a lot of conn->data uses #6425
Closed
Conversation
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
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
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
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
... 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
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.
See https://github.com/curl/curl/wiki/conn.data-considered-bad
At 367 instances left after this PR (down from 917 in master).