diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/file.c | 6 | ||||
| -rw-r--r-- | lib/file.h | 1 | ||||
| -rw-r--r-- | lib/ftp.c | 5 | ||||
| -rw-r--r-- | lib/url.c | 13 | 
4 files changed, 16 insertions, 9 deletions
| diff --git a/lib/file.c b/lib/file.c index dcee427ee..d8a3420c0 100644 --- a/lib/file.c +++ b/lib/file.c @@ -95,6 +95,8 @@   */  static CURLcode Curl_file(struct connectdata *, bool *done); +static CURLcode Curl_file_done(struct connectdata *conn, +                               CURLcode status, bool premature);  /*   * FILE scheme handler. @@ -193,8 +195,8 @@ CURLcode Curl_file_connect(struct connectdata *conn)    return CURLE_OK;  } -CURLcode Curl_file_done(struct connectdata *conn, -                        CURLcode status, bool premature) +static CURLcode Curl_file_done(struct connectdata *conn, +                               CURLcode status, bool premature)  {    struct FILEPROTO *file = conn->data->reqdata.proto.file;    (void)status; /* not used */ diff --git a/lib/file.h b/lib/file.h index 227c0d181..7f338af1a 100644 --- a/lib/file.h +++ b/lib/file.h @@ -26,7 +26,6 @@  #ifndef CURL_DISABLE_FILE  extern const struct Curl_handler Curl_handler_file; -CURLcode Curl_file_done(struct connectdata *, CURLcode, bool premature);  CURLcode Curl_file_connect(struct connectdata *);  #endif  #endif @@ -146,7 +146,9 @@ static int Curl_ftp_getsock(struct connectdata *conn,  static CURLcode Curl_ftp_doing(struct connectdata *conn,                                 bool *dophase_done);  static CURLcode Curl_ftp_setup_connection(struct connectdata * conn); +#ifdef USE_SSL  static CURLcode Curl_ftps_setup_connection(struct connectdata * conn); +#endif  /* easy-to-use macro: */  #define FTPSENDF(x,y,z)    if ((result = Curl_ftpsendf(x,y,z)) != CURLE_OK) \ @@ -4159,6 +4161,7 @@ static CURLcode Curl_ftp_setup_connection(struct connectdata * conn)    return CURLE_OK;  } +#ifdef USE_SSL  static CURLcode Curl_ftps_setup_connection(struct connectdata * conn)  {    struct SessionHandle *data = conn->data; @@ -4166,4 +4169,6 @@ static CURLcode Curl_ftps_setup_connection(struct connectdata * conn)    conn->ssl[SECONDARYSOCKET].use = data->set.ftp_ssl != CURLUSESSL_CONTROL;    return Curl_ftp_setup_connection(conn);  } +#endif +  #endif /* CURL_DISABLE_FTP */ @@ -169,6 +169,10 @@ static struct SessionHandle* gethandleathead(struct curl_llist *pipeline);  static void flush_cookies(struct SessionHandle *data, int cleanup);  #endif +#ifdef CURL_DISABLE_VERBOSE_STRINGS +#define verboseconnect(x)  do { } while (0) +#endif +  #define MAX_PIPELINE_LENGTH 5  /* @@ -262,7 +266,7 @@ static const struct Curl_handler * const protocols[] = {   * Dummy handler for undefined protocol schemes.   */ -const struct Curl_handler Curl_handler_dummy = { +static const struct Curl_handler Curl_handler_dummy = {    "<no protocol>",                      /* scheme */    NULL,                                 /* setup_connection */    NULL,                                 /* do_it */ @@ -278,10 +282,6 @@ const struct Curl_handler Curl_handler_dummy = {    0                                     /* protocol */  }; -#ifdef CURL_DISABLE_VERBOSE_STRINGS -#define verboseconnect(x)  do { } while (0) -#endif -  void Curl_safefree(void *ptr)  {    if(ptr) @@ -3579,7 +3579,8 @@ static CURLcode CreateConnection(struct SessionHandle *data,        result = setup_range(data);        if(result) { -        Curl_file_done(conn, result, FALSE); +        if(conn->handler->done) +          result = conn->handler->done(conn, result, FALSE);          return result;        } | 
