/* make the SessionHandle refer back to this multi handle */
Curl_easy_addmulti(easy_handle, multi_handle);
- /* make the SessionHandle struct refer back to this struct */
- easy->set.one_easy = easy;
-
/* Set the timeout for this handle to expire really soon so that it will
be taken care of even when this handle is added in the midst of operation
when only the curl_multi_socket() API is used. During that flow, only
else
multi->easylp = easy->prev; /* point to last node */
- easy->set.one_easy = NULL; /* detached */
-
/* NOTE NOTE NOTE
We do not touch the easy handle here! */
void Curl_multi_handlePipeBreak(struct SessionHandle *data)
{
- struct SessionHandle *one_easy = data->set.one_easy;
-
- if(one_easy)
- one_easy->easy_conn = NULL;
+ data->easy_conn = NULL;
}
static int waitconnect_getsock(struct connectdata *conn,
/* If the pipeline is enabled, take the handle which is in the head of
the pipeline. If we should write into the socket, take the send_pipe
head. If we should read from the socket, take the recv_pipe head. */
- if(data->set.one_easy->easy_conn) {
+ if(data->easy_conn) {
if((ev_bitmask & CURL_POLL_OUT) &&
- data->set.one_easy->easy_conn->send_pipe &&
- data->set.one_easy->easy_conn->send_pipe->head)
- data = data->set.one_easy->easy_conn->send_pipe->head->ptr;
+ data->easy_conn->send_pipe &&
+ data->easy_conn->send_pipe->head)
+ data = data->easy_conn->send_pipe->head->ptr;
else if((ev_bitmask & CURL_POLL_IN) &&
- data->set.one_easy->easy_conn->recv_pipe &&
- data->set.one_easy->easy_conn->recv_pipe->head)
- data = data->set.one_easy->easy_conn->recv_pipe->head->ptr;
+ data->easy_conn->recv_pipe &&
+ data->easy_conn->recv_pipe->head)
+ data = data->easy_conn->recv_pipe->head->ptr;
}
- if(data->set.one_easy->easy_conn &&
- !(data->set.one_easy->easy_conn->handler->flags & PROTOPT_DIRLOCK))
+ if(data->easy_conn &&
+ !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK))
/* set socket event bitmask if they're not locked */
- data->set.one_easy->easy_conn->cselect_bits = ev_bitmask;
+ data->easy_conn->cselect_bits = ev_bitmask;
do
- result = multi_runsingle(multi, now, data->set.one_easy);
+ result = multi_runsingle(multi, now, data);
while(CURLM_CALL_MULTI_PERFORM == result);
- if(data->set.one_easy->easy_conn &&
- !(data->set.one_easy->easy_conn->handler->flags & PROTOPT_DIRLOCK))
+ if(data->easy_conn &&
+ !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK))
/* clear the bitmask only if not locked */
- data->set.one_easy->easy_conn->cselect_bits = 0;
+ data->easy_conn->cselect_bits = 0;
if(CURLM_OK >= result)
/* get the socket(s) and check if the state has been changed since
last */
- singlesocket(multi, data->set.one_easy);
+ singlesocket(multi, data);
/* Now we fall-through and do the timer-based stuff, since we don't want
to force the user to have to deal with timeouts as long as at least
/* the first loop lap 'data' can be NULL */
if(data) {
do
- result = multi_runsingle(multi, now, data->set.one_easy);
+ result = multi_runsingle(multi, now, data);
while(CURLM_CALL_MULTI_PERFORM == result);
if(CURLM_OK >= result)
/* get the socket(s) and check if the state has been changed since
last */
- singlesocket(multi, data->set.one_easy);
+ singlesocket(multi, data);
}
/* Check if there's one (more) expired timer to deal with! This function
}
void Curl_multi_set_easy_connection(struct SessionHandle *handle,
- struct connectdata *conn)
+ struct connectdata *conn)
{
- handle->set.one_easy->easy_conn = conn;
+ handle->easy_conn = conn;
}
static bool isHandleAtHead(struct SessionHandle *handle,