Commit 61ffcd78 authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Made a few more functions static with the protocol handler table in place.

parent a9f47b93
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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,7 +195,7 @@ CURLcode Curl_file_connect(struct connectdata *conn)
  return CURLE_OK;
}

CURLcode Curl_file_done(struct connectdata *conn,
static CURLcode Curl_file_done(struct connectdata *conn,
                               CURLcode status, bool premature)
{
  struct FILEPROTO *file = conn->data->reqdata.proto.file;
+0 −1
Original line number Diff line number Diff line
@@ -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
+5 −0
Original line number Diff line number Diff line
@@ -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 */
+7 −6
Original line number Diff line number Diff line
@@ -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;
      }