aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-08-02 12:21:11 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-08-03 22:51:35 +0200
commit3cd43bbfecf571d8cf89d87edf29b8a6257a1379 (patch)
treeaec7f40196bf266d57d6a183e9696dbcee9f236e /lib
parent204e340bcdf9cb42115d93ce06ee140c7eef90a8 (diff)
multi: rename all Curl_one_easy to SessionHandle
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c34
-rw-r--r--lib/multihandle.h6
-rw-r--r--lib/urldata.h8
3 files changed, 23 insertions, 25 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 0b3a3aac7..d5987c4fb 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -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,
@@ -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
@@ -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;
@@ -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 */
@@ -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;
@@ -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)
@@ -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;
@@ -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;
@@ -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;
@@ -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();
@@ -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 */
@@ -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;
@@ -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);
@@ -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) {
@@ -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);
diff --git a/lib/multihandle.h b/lib/multihandle.h
index 714abf6b7..552aa9379 100644
--- a/lib/multihandle.h
+++ b/lib/multihandle.h
@@ -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
@@ -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
diff --git a/lib/urldata.h b/lib/urldata.h
index 4fa3ea19a..fed15db66 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -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 {
@@ -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
@@ -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 */