Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a lot of conn->data uses #6425

Closed
wants to merge 1 commit into from
Closed

Remove a lot of conn->data uses #6425

wants to merge 1 commit into from

Conversation

@bagder
Copy link
Member

@bagder bagder commented Jan 8, 2021

See https://github.com/curl/curl/wiki/conn.data-considered-bad

At 367 instances left after this PR (down from 917 in master).

@bagder bagder added the tidy-up label Jan 8, 2021
@bagder bagder force-pushed the bagder/data-for-conn branch from 24fc44b to a5f9a6f Jan 9, 2021
@bagder bagder marked this pull request as draft Jan 9, 2021
@bagder bagder force-pushed the bagder/data-for-conn branch from bbdcb78 to 5c867e7 Jan 10, 2021
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 bagder force-pushed the bagder/data-for-conn branch from 6c86ef2 to f79ba42 Jan 11, 2021
@bagder bagder marked this pull request as ready for review Jan 11, 2021
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 bagder force-pushed the bagder/data-for-conn branch from db008a7 to de522aa Jan 11, 2021
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 bagder force-pushed the bagder/data-for-conn branch from de522aa to 63db91d Jan 12, 2021
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
@bagder bagder force-pushed the bagder/data-for-conn branch from 01ef54b to 08af194 Jan 14, 2021
... 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
@bagder bagder force-pushed the bagder/data-for-conn branch from 54a1731 to d0cceac Jan 15, 2021
@bagder bagder closed this in 215db08 Jan 17, 2021
@bagder bagder deleted the bagder/data-for-conn branch Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant