mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
multi: make the "general" list of easy handles a Curl_llist
Instead of having an especially "unique" linked list handler for the main list of easy handles within the multi handle, this now uses a regular Curl_llist for this as well. With this change, it is also clearer that every easy handle added to a multi handle belongs to one and only one out of three different lists: process - the general one for normal transfer processing pending - queued up waiting to get a connection (MSTATE_PENDING) msgsent - transfer completed (MSTATE_MSGSENT) An easy handle must therefore be removed from the current list before it gets added to another. Closes #14474
This commit is contained in:
parent
9e4a2187e7
commit
2c15ee4bdb
7 changed files with 112 additions and 135 deletions
|
|
@ -86,20 +86,16 @@ struct Curl_multi {
|
|||
this multi handle with an easy handle. Set this to CURL_MULTI_HANDLE. */
|
||||
unsigned int magic;
|
||||
|
||||
/* We have a doubly-linked list with easy handles */
|
||||
struct Curl_easy *easyp;
|
||||
struct Curl_easy *easylp; /* last node */
|
||||
|
||||
unsigned int num_easy; /* amount of entries in the linked list above. */
|
||||
unsigned int num_alive; /* amount of easy handles that are added but have
|
||||
not yet reached COMPLETE state */
|
||||
|
||||
struct Curl_llist msglist; /* a list of messages from completed transfers */
|
||||
|
||||
struct Curl_llist pending; /* Curl_easys that are in the
|
||||
MSTATE_PENDING state */
|
||||
struct Curl_llist msgsent; /* Curl_easys that are in the
|
||||
MSTATE_MSGSENT state */
|
||||
/* Each added easy handle is in ONE of these three lists */
|
||||
struct Curl_llist process; /* not in PENDING or MSGSENT */
|
||||
struct Curl_llist pending; /* in PENDING */
|
||||
struct Curl_llist msgsent; /* in MSGSENT */
|
||||
|
||||
/* callback function and user data pointer for the *socket() API */
|
||||
curl_socket_callback socket_cb;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue