Loading lib/multi.c +17 −17 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ ((x) && (((struct SessionHandle *)(x))->magic == CURLEASY_MAGIC_NUMBER)) static void singlesocket(struct Curl_multi *multi, struct Curl_one_easy *easy); struct SessionHandle *easy); static int update_timer(struct Curl_multi *multi); static bool isHandleAtHead(struct SessionHandle *handle, Loading Loading @@ -105,7 +105,7 @@ static const char * const statename[]={ static void multi_freetimeout(void *a, void *b); /* always use this function to change state, to make debugging easier */ static void mstate(struct Curl_one_easy *easy, CURLMstate state static void mstate(struct SessionHandle *easy, CURLMstate state #ifdef DEBUGBUILD , int lineno #endif Loading Loading @@ -334,7 +334,7 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle) { struct curl_llist *timeoutlist; struct Curl_one_easy *easy; struct SessionHandle *easy; struct Curl_multi *multi = (struct Curl_multi *)multi_handle; struct SessionHandle *data = (struct SessionHandle *)easy_handle; struct SessionHandle *new_closure = NULL; Loading Loading @@ -422,14 +422,14 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, easy->state.conn_cache = multi->conn_cache; /* This adds the new entry at the 'end' of the doubly-linked circular list of Curl_one_easy structs to try and maintain a FIFO queue so list of SessionHandle structs to try and maintain a FIFO queue so the pipelined requests are in order. */ /* We add this new entry last in the list. */ easy->next = NULL; /* end of the line */ if(multi->easyp) { struct Curl_one_easy *last = multi->easylp; struct SessionHandle *last = multi->easylp; last->next = easy; easy->prev = last; multi->easylp = easy; /* the new last node */ Loading Loading @@ -638,7 +638,7 @@ bool Curl_multi_pipeline_enabled(const struct Curl_multi *multi) void Curl_multi_handlePipeBreak(struct SessionHandle *data) { struct Curl_one_easy *one_easy = data->set.one_easy; struct SessionHandle *one_easy = data->set.one_easy; if(one_easy) one_easy->easy_conn = NULL; Loading Loading @@ -671,7 +671,7 @@ static int domore_getsock(struct connectdata *conn, } /* returns bitmapped flags for this handle and its sockets */ static int multi_getsock(struct Curl_one_easy *easy, static int multi_getsock(struct SessionHandle *easy, curl_socket_t *socks, /* points to numsocks number of sockets */ int numsocks) Loading Loading @@ -742,7 +742,7 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle, Some easy handles may not have connected to the remote host yet, and then we must make sure that is done. */ struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct SessionHandle *easy; int this_max_fd=-1; curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE]; int bitmap; Loading Loading @@ -791,7 +791,7 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, int *ret) { struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct SessionHandle *easy; curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE]; int bitmap; unsigned int i; Loading Loading @@ -925,7 +925,7 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, static CURLMcode multi_runsingle(struct Curl_multi *multi, struct timeval now, struct Curl_one_easy *easy) struct SessionHandle *easy) { struct Curl_message *msg = NULL; bool connected; Loading Loading @@ -1722,7 +1722,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles) { struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct SessionHandle *easy; CURLMcode returncode=CURLM_OK; struct Curl_tree *t; struct timeval now = Curl_tvnow(); Loading Loading @@ -1803,8 +1803,8 @@ static void close_all_connections(struct Curl_multi *multi) CURLMcode curl_multi_cleanup(CURLM *multi_handle) { struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct Curl_one_easy *nexteasy; struct SessionHandle *easy; struct SessionHandle *nexteasy; if(GOOD_MULTI_HANDLE(multi)) { multi->type = 0; /* not good anymore */ Loading Loading @@ -1907,7 +1907,7 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue) * call the callback accordingly. */ static void singlesocket(struct Curl_multi *multi, struct Curl_one_easy *easy) struct SessionHandle *easy) { curl_socket_t socks[MAX_SOCKSPEREASYHANDLE]; int i; Loading Loading @@ -2159,7 +2159,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi, struct timeval now = Curl_tvnow(); if(checkall) { struct Curl_one_easy *easy; struct SessionHandle *easy; /* *perform() deals with running_handles on its own */ result = curl_multi_perform(multi, running_handles); Loading Loading @@ -2693,7 +2693,7 @@ struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi) void Curl_multi_process_pending_handles(struct Curl_multi *multi) { struct Curl_one_easy *easy; struct SessionHandle *easy; easy=multi->easyp; while(easy) { Loading @@ -2710,7 +2710,7 @@ void Curl_multi_process_pending_handles(struct Curl_multi *multi) void Curl_multi_dump(const struct Curl_multi *multi_handle) { struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct SessionHandle *easy; int i; fprintf(stderr, "* Multi status: %d handles, %d alive\n", multi->num_easy, multi->num_alive); Loading lib/multihandle.h +2 −4 Original line number Diff line number Diff line Loading @@ -59,8 +59,6 @@ typedef enum { #define GETSOCK_READABLE (0x00ff) #define GETSOCK_WRITABLE (0xff00) #define Curl_one_easy SessionHandle /* This is the struct known as CURLM on the outside */ struct Curl_multi { /* First a simple identifier to easier detect if a user mix up Loading @@ -68,8 +66,8 @@ struct Curl_multi { long type; /* We have a doubly-linked circular list with easy handles */ struct Curl_one_easy *easyp; struct Curl_one_easy *easylp; /* last node */ struct SessionHandle *easyp; struct SessionHandle *easylp; /* last node */ int num_easy; /* amount of entries in the linked list above. */ int num_alive; /* amount of easy handles that are added but have not yet Loading lib/urldata.h +4 −4 Original line number Diff line number Diff line Loading @@ -1329,7 +1329,7 @@ struct DynamicStatic { * the 'DynamicStatic' struct. * Character pointer fields point to dynamic storage, unless otherwise stated. */ struct Curl_one_easy; /* declared and used only in multi.c */ struct Curl_multi; /* declared and used only in multi.c */ enum dupstring { Loading Loading @@ -1492,7 +1492,7 @@ struct UserDefined { long buffer_size; /* size of receive buffer to use */ void *private_data; /* application-private data */ struct Curl_one_easy *one_easy; /* When adding an easy handle to a multi struct SessionHandle *one_easy; /* When adding an easy handle to a multi handle, an internal 'Curl_one_easy' struct is created and this is a pointer to the particular struct associated with Loading Loading @@ -1621,8 +1621,8 @@ struct Names { struct SessionHandle { /* first, two fields for the linked list of these */ struct Curl_one_easy *next; struct Curl_one_easy *prev; struct SessionHandle *next; struct SessionHandle *prev; struct connectdata *easy_conn; /* the "unit's" connection */ Loading Loading
lib/multi.c +17 −17 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ ((x) && (((struct SessionHandle *)(x))->magic == CURLEASY_MAGIC_NUMBER)) static void singlesocket(struct Curl_multi *multi, struct Curl_one_easy *easy); struct SessionHandle *easy); static int update_timer(struct Curl_multi *multi); static bool isHandleAtHead(struct SessionHandle *handle, Loading Loading @@ -105,7 +105,7 @@ static const char * const statename[]={ static void multi_freetimeout(void *a, void *b); /* always use this function to change state, to make debugging easier */ static void mstate(struct Curl_one_easy *easy, CURLMstate state static void mstate(struct SessionHandle *easy, CURLMstate state #ifdef DEBUGBUILD , int lineno #endif Loading Loading @@ -334,7 +334,7 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle) { struct curl_llist *timeoutlist; struct Curl_one_easy *easy; struct SessionHandle *easy; struct Curl_multi *multi = (struct Curl_multi *)multi_handle; struct SessionHandle *data = (struct SessionHandle *)easy_handle; struct SessionHandle *new_closure = NULL; Loading Loading @@ -422,14 +422,14 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, easy->state.conn_cache = multi->conn_cache; /* This adds the new entry at the 'end' of the doubly-linked circular list of Curl_one_easy structs to try and maintain a FIFO queue so list of SessionHandle structs to try and maintain a FIFO queue so the pipelined requests are in order. */ /* We add this new entry last in the list. */ easy->next = NULL; /* end of the line */ if(multi->easyp) { struct Curl_one_easy *last = multi->easylp; struct SessionHandle *last = multi->easylp; last->next = easy; easy->prev = last; multi->easylp = easy; /* the new last node */ Loading Loading @@ -638,7 +638,7 @@ bool Curl_multi_pipeline_enabled(const struct Curl_multi *multi) void Curl_multi_handlePipeBreak(struct SessionHandle *data) { struct Curl_one_easy *one_easy = data->set.one_easy; struct SessionHandle *one_easy = data->set.one_easy; if(one_easy) one_easy->easy_conn = NULL; Loading Loading @@ -671,7 +671,7 @@ static int domore_getsock(struct connectdata *conn, } /* returns bitmapped flags for this handle and its sockets */ static int multi_getsock(struct Curl_one_easy *easy, static int multi_getsock(struct SessionHandle *easy, curl_socket_t *socks, /* points to numsocks number of sockets */ int numsocks) Loading Loading @@ -742,7 +742,7 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle, Some easy handles may not have connected to the remote host yet, and then we must make sure that is done. */ struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct SessionHandle *easy; int this_max_fd=-1; curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE]; int bitmap; Loading Loading @@ -791,7 +791,7 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, int *ret) { struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct SessionHandle *easy; curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE]; int bitmap; unsigned int i; Loading Loading @@ -925,7 +925,7 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, static CURLMcode multi_runsingle(struct Curl_multi *multi, struct timeval now, struct Curl_one_easy *easy) struct SessionHandle *easy) { struct Curl_message *msg = NULL; bool connected; Loading Loading @@ -1722,7 +1722,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles) { struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct SessionHandle *easy; CURLMcode returncode=CURLM_OK; struct Curl_tree *t; struct timeval now = Curl_tvnow(); Loading Loading @@ -1803,8 +1803,8 @@ static void close_all_connections(struct Curl_multi *multi) CURLMcode curl_multi_cleanup(CURLM *multi_handle) { struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct Curl_one_easy *nexteasy; struct SessionHandle *easy; struct SessionHandle *nexteasy; if(GOOD_MULTI_HANDLE(multi)) { multi->type = 0; /* not good anymore */ Loading Loading @@ -1907,7 +1907,7 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue) * call the callback accordingly. */ static void singlesocket(struct Curl_multi *multi, struct Curl_one_easy *easy) struct SessionHandle *easy) { curl_socket_t socks[MAX_SOCKSPEREASYHANDLE]; int i; Loading Loading @@ -2159,7 +2159,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi, struct timeval now = Curl_tvnow(); if(checkall) { struct Curl_one_easy *easy; struct SessionHandle *easy; /* *perform() deals with running_handles on its own */ result = curl_multi_perform(multi, running_handles); Loading Loading @@ -2693,7 +2693,7 @@ struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi) void Curl_multi_process_pending_handles(struct Curl_multi *multi) { struct Curl_one_easy *easy; struct SessionHandle *easy; easy=multi->easyp; while(easy) { Loading @@ -2710,7 +2710,7 @@ void Curl_multi_process_pending_handles(struct Curl_multi *multi) void Curl_multi_dump(const struct Curl_multi *multi_handle) { struct Curl_multi *multi=(struct Curl_multi *)multi_handle; struct Curl_one_easy *easy; struct SessionHandle *easy; int i; fprintf(stderr, "* Multi status: %d handles, %d alive\n", multi->num_easy, multi->num_alive); Loading
lib/multihandle.h +2 −4 Original line number Diff line number Diff line Loading @@ -59,8 +59,6 @@ typedef enum { #define GETSOCK_READABLE (0x00ff) #define GETSOCK_WRITABLE (0xff00) #define Curl_one_easy SessionHandle /* This is the struct known as CURLM on the outside */ struct Curl_multi { /* First a simple identifier to easier detect if a user mix up Loading @@ -68,8 +66,8 @@ struct Curl_multi { long type; /* We have a doubly-linked circular list with easy handles */ struct Curl_one_easy *easyp; struct Curl_one_easy *easylp; /* last node */ struct SessionHandle *easyp; struct SessionHandle *easylp; /* last node */ int num_easy; /* amount of entries in the linked list above. */ int num_alive; /* amount of easy handles that are added but have not yet Loading
lib/urldata.h +4 −4 Original line number Diff line number Diff line Loading @@ -1329,7 +1329,7 @@ struct DynamicStatic { * the 'DynamicStatic' struct. * Character pointer fields point to dynamic storage, unless otherwise stated. */ struct Curl_one_easy; /* declared and used only in multi.c */ struct Curl_multi; /* declared and used only in multi.c */ enum dupstring { Loading Loading @@ -1492,7 +1492,7 @@ struct UserDefined { long buffer_size; /* size of receive buffer to use */ void *private_data; /* application-private data */ struct Curl_one_easy *one_easy; /* When adding an easy handle to a multi struct SessionHandle *one_easy; /* When adding an easy handle to a multi handle, an internal 'Curl_one_easy' struct is created and this is a pointer to the particular struct associated with Loading Loading @@ -1621,8 +1621,8 @@ struct Names { struct SessionHandle { /* first, two fields for the linked list of these */ struct Curl_one_easy *next; struct Curl_one_easy *prev; struct SessionHandle *next; struct SessionHandle *prev; struct connectdata *easy_conn; /* the "unit's" connection */ Loading