Skip to content

Commit

Permalink
multi: turn Curl_done into file local multi_done
Browse files Browse the repository at this point in the history
... as it now is used by multi.c only.
  • Loading branch information
bagder committed Mar 30, 2016
1 parent 93935c0 commit 575e885
Show file tree
Hide file tree
Showing 9 changed files with 201 additions and 224 deletions.
7 changes: 1 addition & 6 deletions lib/ftp.c
Expand Up @@ -3242,7 +3242,7 @@ static CURLcode ftp_connect(struct connectdata *conn,
* Input argument is already checked for validity.
*/
static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
bool premature)
bool premature)
{
struct SessionHandle *data = conn->data;
struct FTP *ftp = data->req.protop;
Expand All @@ -3256,11 +3256,6 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
const char *path_to_use = data->state.path;

if(!ftp)
/* When the easy handle is removed from the multi while libcurl is still
* trying to resolve the host name, it seems that the ftp struct is not
* yet initialized, but the removal action calls Curl_done() which calls
* this function. So we simply return success if no ftp pointer is set.
*/
return CURLE_OK;

switch(status) {
Expand Down
4 changes: 2 additions & 2 deletions lib/http.c
Expand Up @@ -1434,8 +1434,8 @@ static int https_getsock(struct connectdata *conn,
#endif /* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL */

/*
* Curl_http_done() gets called from Curl_done() after a single HTTP request
* has been performed.
* Curl_http_done() gets called after a single HTTP request has been
* performed.
*/

CURLcode Curl_http_done(struct connectdata *conn,
Expand Down
7 changes: 1 addition & 6 deletions lib/imap.c
Expand Up @@ -1486,10 +1486,6 @@ static CURLcode imap_done(struct connectdata *conn, CURLcode status,
(void)premature;

if(!imap)
/* When the easy handle is removed from the multi interface while libcurl
is still trying to resolve the host name, the IMAP struct is not yet
initialized. However, the removal action calls Curl_done() which in
turn calls this function, so we simply return success. */
return CURLE_OK;

if(status) {
Expand All @@ -1512,8 +1508,7 @@ static CURLcode imap_done(struct connectdata *conn, CURLcode status,
TODO: when the multi interface is used, this _really_ should be using
the imap_multi_statemach function but we have no general support for
non-blocking DONE operations, not in the multi state machine and with
Curl_done() invokes on several places in the code!
non-blocking DONE operations!
*/
if(!result)
result = imap_block_statemach(conn);
Expand Down

0 comments on commit 575e885

Please sign in to comment.