Loading lib/multi.c +7 −0 Original line number Diff line number Diff line Loading @@ -958,9 +958,16 @@ CURLMcode Curl_multi_add_perform(struct Curl_multi *multi, rc = curl_multi_add_handle(multi, data); if(!rc) { struct SingleRequest *k = &data->req; /* pass in NULL for 'conn' here since we don't want to init the connection, only this transfer */ Curl_init_do(data, NULL); /* take this handle to the perform state right away */ multistate(data, CURLM_STATE_PERFORM); data->easy_conn = conn; k->keepon |= KEEP_RECV; /* setup to receive! */ } return rc; } Loading lib/url.c +12 −9 Original line number Diff line number Diff line Loading @@ -142,7 +142,6 @@ find_oldest_idle_connection_in_bundle(struct SessionHandle *data, struct connectbundle *bundle); static void conn_free(struct connectdata *conn); static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke); static CURLcode do_init(struct connectdata *conn); static CURLcode parse_url_login(struct SessionHandle *data, struct connectdata *conn, char **userptr, char **passwdptr, Loading Loading @@ -5651,7 +5650,7 @@ static CURLcode create_conn(struct SessionHandle *data, } /* since we skip do_init() */ do_init(conn); Curl_init_do(data, conn); goto out; } Loading Loading @@ -5830,7 +5829,7 @@ static CURLcode create_conn(struct SessionHandle *data, conn->inuse = TRUE; /* Setup and init stuff before DO starts, in preparing for the transfer. */ do_init(conn); Curl_init_do(data, conn); /* * Setup whatever necessary for a resumed transfer Loading Loading @@ -6112,20 +6111,24 @@ CURLcode Curl_done(struct connectdata **connp, } /* * do_init() inits the readwrite session. This is inited each time (in the DO * function before the protocol-specific DO functions are invoked) for a * transfer, sometimes multiple times on the same SessionHandle. Make sure * Curl_init_do() inits the readwrite session. This is inited each time (in * the DO function before the protocol-specific DO functions are invoked) for * a transfer, sometimes multiple times on the same SessionHandle. Make sure * nothing in here depends on stuff that are setup dynamically for the * transfer. * * Allow this function to get called with 'conn' set to NULL. */ static CURLcode do_init(struct connectdata *conn) CURLcode Curl_init_do(struct SessionHandle *data, struct connectdata *conn) { struct SessionHandle *data = conn->data; struct SingleRequest *k = &data->req; if(conn) conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to * use */ data->state.done = FALSE; /* Curl_done() is not called yet */ conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to use */ data->state.expect100header = FALSE; if(data->set.opt_no_body) Loading lib/url.h +2 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading @@ -27,6 +27,7 @@ * Prototypes for library-wide functions provided by url.c */ CURLcode Curl_init_do(struct SessionHandle *data, struct connectdata *conn); CURLcode Curl_open(struct SessionHandle **curl); CURLcode Curl_init_userdefined(struct UserDefined *set); CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, Loading Loading
lib/multi.c +7 −0 Original line number Diff line number Diff line Loading @@ -958,9 +958,16 @@ CURLMcode Curl_multi_add_perform(struct Curl_multi *multi, rc = curl_multi_add_handle(multi, data); if(!rc) { struct SingleRequest *k = &data->req; /* pass in NULL for 'conn' here since we don't want to init the connection, only this transfer */ Curl_init_do(data, NULL); /* take this handle to the perform state right away */ multistate(data, CURLM_STATE_PERFORM); data->easy_conn = conn; k->keepon |= KEEP_RECV; /* setup to receive! */ } return rc; } Loading
lib/url.c +12 −9 Original line number Diff line number Diff line Loading @@ -142,7 +142,6 @@ find_oldest_idle_connection_in_bundle(struct SessionHandle *data, struct connectbundle *bundle); static void conn_free(struct connectdata *conn); static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke); static CURLcode do_init(struct connectdata *conn); static CURLcode parse_url_login(struct SessionHandle *data, struct connectdata *conn, char **userptr, char **passwdptr, Loading Loading @@ -5651,7 +5650,7 @@ static CURLcode create_conn(struct SessionHandle *data, } /* since we skip do_init() */ do_init(conn); Curl_init_do(data, conn); goto out; } Loading Loading @@ -5830,7 +5829,7 @@ static CURLcode create_conn(struct SessionHandle *data, conn->inuse = TRUE; /* Setup and init stuff before DO starts, in preparing for the transfer. */ do_init(conn); Curl_init_do(data, conn); /* * Setup whatever necessary for a resumed transfer Loading Loading @@ -6112,20 +6111,24 @@ CURLcode Curl_done(struct connectdata **connp, } /* * do_init() inits the readwrite session. This is inited each time (in the DO * function before the protocol-specific DO functions are invoked) for a * transfer, sometimes multiple times on the same SessionHandle. Make sure * Curl_init_do() inits the readwrite session. This is inited each time (in * the DO function before the protocol-specific DO functions are invoked) for * a transfer, sometimes multiple times on the same SessionHandle. Make sure * nothing in here depends on stuff that are setup dynamically for the * transfer. * * Allow this function to get called with 'conn' set to NULL. */ static CURLcode do_init(struct connectdata *conn) CURLcode Curl_init_do(struct SessionHandle *data, struct connectdata *conn) { struct SessionHandle *data = conn->data; struct SingleRequest *k = &data->req; if(conn) conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to * use */ data->state.done = FALSE; /* Curl_done() is not called yet */ conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to use */ data->state.expect100header = FALSE; if(data->set.opt_no_body) Loading
lib/url.h +2 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading @@ -27,6 +27,7 @@ * Prototypes for library-wide functions provided by url.c */ CURLcode Curl_init_do(struct SessionHandle *data, struct connectdata *conn); CURLcode Curl_open(struct SessionHandle **curl); CURLcode Curl_init_userdefined(struct UserDefined *set); CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, Loading