1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

All static functions that were previously name Curl_* something no longer

use that prefix as we use that prefix only for library-wide internal global
symbols.
This commit is contained in:
Daniel Stenberg 2007-12-08 22:50:55 +00:00
parent f8172f85b1
commit 662bee7193
11 changed files with 185 additions and 185 deletions

View File

@ -87,7 +87,7 @@
* Forward declarations.
*/
static CURLcode Curl_dict(struct connectdata *conn, bool *done);
static CURLcode dict_do(struct connectdata *conn, bool *done);
/*
* DICT protocol handler.
@ -96,7 +96,7 @@ static CURLcode Curl_dict(struct connectdata *conn, bool *done);
const struct Curl_handler Curl_handler_dict = {
"DICT", /* scheme */
ZERO_NULL, /* setup_connection */
Curl_dict, /* do_it */
dict_do, /* do_it */
ZERO_NULL, /* done */
ZERO_NULL, /* do_more */
ZERO_NULL, /* connect_it */
@ -142,7 +142,7 @@ static char *unescape_word(struct SessionHandle *data, const char *inp)
return dictp;
}
static CURLcode Curl_dict(struct connectdata *conn, bool *done)
static CURLcode dict_do(struct connectdata *conn, bool *done)
{
char *word;
char *eword;

View File

@ -94,10 +94,10 @@
* Forward declarations.
*/
static CURLcode Curl_file(struct connectdata *, bool *done);
static CURLcode Curl_file_done(struct connectdata *conn,
CURLcode status, bool premature);
static CURLcode Curl_file_connect(struct connectdata *conn, bool *done);
static CURLcode file_do(struct connectdata *, bool *done);
static CURLcode file_done(struct connectdata *conn,
CURLcode status, bool premature);
static CURLcode file_connect(struct connectdata *conn, bool *done);
/*
* FILE scheme handler.
@ -106,10 +106,10 @@ static CURLcode Curl_file_connect(struct connectdata *conn, bool *done);
const struct Curl_handler Curl_handler_file = {
"FILE", /* scheme */
ZERO_NULL, /* setup_connection */
Curl_file, /* do_it */
Curl_file_done, /* done */
file_do, /* do_it */
file_done, /* done */
ZERO_NULL, /* do_more */
Curl_file_connect, /* connect_it */
file_connect, /* connect_it */
ZERO_NULL, /* connecting */
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
@ -120,11 +120,11 @@ const struct Curl_handler Curl_handler_file = {
};
/*
* Curl_file_connect() gets called from Curl_protocol_connect() to allow us to
* file_connect() gets called from Curl_protocol_connect() to allow us to
* do protocol-specific actions at connect-time. We emulate a
* connect-then-transfer protocol and "connect" to the file here
*/
static CURLcode Curl_file_connect(struct connectdata *conn, bool *done)
static CURLcode file_connect(struct connectdata *conn, bool *done)
{
struct SessionHandle *data = conn->data;
char *real_path = curl_easy_unescape(data, data->state.path, 0, NULL);
@ -201,7 +201,7 @@ static CURLcode Curl_file_connect(struct connectdata *conn, bool *done)
file->fd = fd;
if(!data->set.upload && (fd == -1)) {
failf(data, "Couldn't open file %s", data->state.path);
Curl_file_done(conn, CURLE_FILE_COULDNT_READ_FILE, FALSE);
file_done(conn, CURLE_FILE_COULDNT_READ_FILE, FALSE);
return CURLE_FILE_COULDNT_READ_FILE;
}
*done = TRUE;
@ -209,7 +209,7 @@ static CURLcode Curl_file_connect(struct connectdata *conn, bool *done)
return CURLE_OK;
}
static CURLcode Curl_file_done(struct connectdata *conn,
static CURLcode file_done(struct connectdata *conn,
CURLcode status, bool premature)
{
struct FILEPROTO *file = conn->data->state.proto.file;
@ -349,14 +349,14 @@ static CURLcode file_upload(struct connectdata *conn)
}
/*
* Curl_file() is the protocol-specific function for the do-phase, separated
* file_do() is the protocol-specific function for the do-phase, separated
* from the connect-phase above. Other protocols merely setup the transfer in
* the do-phase, to have it done in the main transfer loop but since some
* platforms we support don't allow select()ing etc on file handles (as
* opposed to sockets) we instead perform the whole do-operation in this
* function.
*/
static CURLcode Curl_file(struct connectdata *conn, bool *done)
static CURLcode file_do(struct connectdata *conn, bool *done)
{
/* This implementation ignores the host name in conformance with
RFC 1738. Only local files (reachable via the standard file system)

110
lib/ftp.c
View File

@ -134,21 +134,21 @@ static CURLcode ftp_nb_type(struct connectdata *conn,
bool ascii, ftpstate newstate);
static int ftp_need_type(struct connectdata *conn,
bool ascii);
static CURLcode Curl_ftp(struct connectdata *conn, bool *done);
static CURLcode Curl_ftp_done(struct connectdata *conn,
static CURLcode ftp_do(struct connectdata *conn, bool *done);
static CURLcode ftp_done(struct connectdata *conn,
CURLcode, bool premature);
static CURLcode Curl_ftp_connect(struct connectdata *conn, bool *done);
static CURLcode Curl_ftp_disconnect(struct connectdata *conn);
static CURLcode Curl_ftp_nextconnect(struct connectdata *conn);
static CURLcode Curl_ftp_multi_statemach(struct connectdata *conn, bool *done);
static int Curl_ftp_getsock(struct connectdata *conn,
static CURLcode ftp_connect(struct connectdata *conn, bool *done);
static CURLcode ftp_disconnect(struct connectdata *conn);
static CURLcode ftp_nextconnect(struct connectdata *conn);
static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done);
static int ftp_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks);
static CURLcode Curl_ftp_doing(struct connectdata *conn,
static CURLcode ftp_doing(struct connectdata *conn,
bool *dophase_done);
static CURLcode Curl_ftp_setup_connection(struct connectdata * conn);
static CURLcode ftp_setup_connection(struct connectdata * conn);
#ifdef USE_SSL
static CURLcode Curl_ftps_setup_connection(struct connectdata * conn);
static CURLcode ftps_setup_connection(struct connectdata * conn);
#endif
/* easy-to-use macro: */
@ -164,16 +164,16 @@ static CURLcode Curl_ftps_setup_connection(struct connectdata * conn);
const struct Curl_handler Curl_handler_ftp = {
"FTP", /* scheme */
Curl_ftp_setup_connection, /* setup_connection */
Curl_ftp, /* do_it */
Curl_ftp_done, /* done */
Curl_ftp_nextconnect, /* do_more */
Curl_ftp_connect, /* connect_it */
Curl_ftp_multi_statemach, /* connecting */
Curl_ftp_doing, /* doing */
Curl_ftp_getsock, /* proto_getsock */
Curl_ftp_getsock, /* doing_getsock */
Curl_ftp_disconnect, /* disconnect */
ftp_setup_connection, /* setup_connection */
ftp_do, /* do_it */
ftp_done, /* done */
ftp_nextconnect, /* do_more */
ftp_connect, /* connect_it */
ftp_multi_statemach, /* connecting */
ftp_doing, /* doing */
ftp_getsock, /* proto_getsock */
ftp_getsock, /* doing_getsock */
ftp_disconnect, /* disconnect */
PORT_FTP, /* defport */
PROT_FTP /* protocol */
};
@ -186,16 +186,16 @@ const struct Curl_handler Curl_handler_ftp = {
const struct Curl_handler Curl_handler_ftps = {
"FTPS", /* scheme */
Curl_ftps_setup_connection, /* setup_connection */
Curl_ftp, /* do_it */
Curl_ftp_done, /* done */
Curl_ftp_nextconnect, /* do_more */
Curl_ftp_connect, /* connect_it */
Curl_ftp_multi_statemach, /* connecting */
Curl_ftp_doing, /* doing */
Curl_ftp_getsock, /* proto_getsock */
Curl_ftp_getsock, /* doing_getsock */
Curl_ftp_disconnect, /* disconnect */
ftps_setup_connection, /* setup_connection */
ftp_do, /* do_it */
ftp_done, /* done */
ftp_nextconnect, /* do_more */
ftp_connect, /* connect_it */
ftp_multi_statemach, /* connecting */
ftp_doing, /* doing */
ftp_getsock, /* proto_getsock */
ftp_getsock, /* doing_getsock */
ftp_disconnect, /* disconnect */
PORT_FTPS, /* defport */
PROT_FTP | PROT_FTPS | PROT_SSL /* protocol */
};
@ -810,7 +810,7 @@ static CURLcode ftp_state_pwd(struct connectdata *conn)
}
/* For the FTP "protocol connect" and "doing" phases only */
static int Curl_ftp_getsock(struct connectdata *conn,
static int ftp_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
{
@ -1589,7 +1589,7 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn,
result=Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
/* Set ->transfer so that we won't get any error in
* Curl_ftp_done() because we didn't transfer anything! */
* ftp_done() because we didn't transfer anything! */
ftp->transfer = FTPTRANSFER_NONE;
state(conn, FTP_STOP);
@ -2148,7 +2148,7 @@ static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
result = Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
infof(data, "File already completely downloaded\n");
/* Set ->transfer so that we won't get any error in Curl_ftp_done()
/* Set ->transfer so that we won't get any error in ftp_done()
* because we didn't transfer the any file */
ftp->transfer = FTPTRANSFER_NONE;
state(conn, FTP_STOP);
@ -2930,7 +2930,7 @@ static long ftp_state_timeout(struct connectdata *conn)
/* called repeatedly until done from multi.c */
static CURLcode Curl_ftp_multi_statemach(struct connectdata *conn,
static CURLcode ftp_multi_statemach(struct connectdata *conn,
bool *done)
{
curl_socket_t sock = conn->sock[FIRSTSOCKET];
@ -3032,14 +3032,14 @@ static CURLcode ftp_init(struct connectdata *conn)
}
/*
* Curl_ftp_connect() should do everything that is to be considered a part of
* ftp_connect() should do everything that is to be considered a part of
* the connection phase.
*
* The variable 'done' points to will be TRUE if the protocol-layer connect
* phase is done when this function returns, or FALSE is not. When called as
* a part of the easy interface, it will always be TRUE.
*/
static CURLcode Curl_ftp_connect(struct connectdata *conn,
static CURLcode ftp_connect(struct connectdata *conn,
bool *done) /* see description above */
{
CURLcode result;
@ -3107,7 +3107,7 @@ static CURLcode Curl_ftp_connect(struct connectdata *conn,
ftpc->response = Curl_tvnow(); /* start response time-out now! */
if(data->state.used_interface == Curl_if_multi)
result = Curl_ftp_multi_statemach(conn, done);
result = ftp_multi_statemach(conn, done);
else {
result = ftp_easy_statemach(conn);
if(!result)
@ -3119,14 +3119,14 @@ static CURLcode Curl_ftp_connect(struct connectdata *conn,
/***********************************************************************
*
* Curl_ftp_done()
* ftp_done()
*
* The DONE function. This does what needs to be done after a single DO has
* performed.
*
* Input argument is already checked for validity.
*/
static CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status,
static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
bool premature)
{
struct SessionHandle *data = conn->data;
@ -3472,19 +3472,19 @@ static CURLcode ftp_range(struct connectdata *conn)
/*
* Curl_ftp_nextconnect()
* ftp_nextconnect()
*
* This function shall be called when the second FTP (data) connection is
* connected.
*/
static CURLcode Curl_ftp_nextconnect(struct connectdata *conn)
static CURLcode ftp_nextconnect(struct connectdata *conn)
{
struct SessionHandle *data=conn->data;
struct ftp_conn *ftpc = &conn->proto.ftpc;
CURLcode result = CURLE_OK;
/* the ftp struct is inited in Curl_ftp_connect() */
/* the ftp struct is inited in ftp_connect() */
struct FTP *ftp = data->state.proto.ftp;
DEBUGF(infof(data, "DO-MORE phase starts\n"));
@ -3574,7 +3574,7 @@ CURLcode ftp_perform(struct connectdata *conn,
/* run the state-machine */
if(conn->data->state.used_interface == Curl_if_multi)
result = Curl_ftp_multi_statemach(conn, dophase_done);
result = ftp_multi_statemach(conn, dophase_done);
else {
result = ftp_easy_statemach(conn);
*dophase_done = TRUE; /* with the easy interface we are done here */
@ -3589,14 +3589,14 @@ CURLcode ftp_perform(struct connectdata *conn,
/***********************************************************************
*
* Curl_ftp()
* ftp_do()
*
* This function is registered as 'curl_do' function. It decodes the path
* parts etc as a wrapper to the actual DO function (ftp_perform).
*
* The input argument is already checked for validity.
*/
static CURLcode Curl_ftp(struct connectdata *conn, bool *done)
static CURLcode ftp_do(struct connectdata *conn, bool *done)
{
CURLcode retcode = CURLE_OK;
@ -3606,7 +3606,7 @@ static CURLcode Curl_ftp(struct connectdata *conn, bool *done)
Since connections can be re-used between SessionHandles, this might be a
connection already existing but on a fresh SessionHandle struct so we must
make sure we have a good 'struct FTP' to play with. For new connections,
the struct FTP is allocated and setup in the Curl_ftp_connect() function.
the struct FTP is allocated and setup in the ftp_connect() function.
*/
Curl_reset_reqproto(conn);
retcode = ftp_init(conn);
@ -3789,12 +3789,12 @@ static CURLcode ftp_quit(struct connectdata *conn)
/***********************************************************************
*
* Curl_ftp_disconnect()
* ftp_disconnect()
*
* Disconnect from an FTP server. Cleanup protocol-specific per-connection
* resources. BLOCKING.
*/
static CURLcode Curl_ftp_disconnect(struct connectdata *conn)
static CURLcode ftp_disconnect(struct connectdata *conn)
{
struct ftp_conn *ftpc= &conn->proto.ftpc;
@ -4024,7 +4024,7 @@ static CURLcode ftp_dophase_done(struct connectdata *conn,
struct ftp_conn *ftpc = &conn->proto.ftpc;
if(connected)
result = Curl_ftp_nextconnect(conn);
result = ftp_nextconnect(conn);
if(result && (conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD)) {
/* Failure detected, close the second socket if it was created already */
@ -4046,11 +4046,11 @@ static CURLcode ftp_dophase_done(struct connectdata *conn,
}
/* called from multi.c while DOing */
static CURLcode Curl_ftp_doing(struct connectdata *conn,
static CURLcode ftp_doing(struct connectdata *conn,
bool *dophase_done)
{
CURLcode result;
result = Curl_ftp_multi_statemach(conn, dophase_done);
result = ftp_multi_statemach(conn, dophase_done);
if(*dophase_done) {
result = ftp_dophase_done(conn, FALSE /* not connected */);
@ -4070,7 +4070,7 @@ static CURLcode Curl_ftp_doing(struct connectdata *conn,
* remote host.
*
* ftp->ctl_valid starts out as FALSE, and gets set to TRUE if we reach the
* Curl_ftp_done() function without finding any major problem.
* ftp_done() function without finding any major problem.
*/
static
CURLcode ftp_regular_transfer(struct connectdata *conn,
@ -4109,7 +4109,7 @@ CURLcode ftp_regular_transfer(struct connectdata *conn,
return result;
}
static CURLcode Curl_ftp_setup_connection(struct connectdata * conn)
static CURLcode ftp_setup_connection(struct connectdata * conn)
{
struct SessionHandle *data = conn->data;
char * type;
@ -4170,12 +4170,12 @@ static CURLcode Curl_ftp_setup_connection(struct connectdata * conn)
}
#ifdef USE_SSL
static CURLcode Curl_ftps_setup_connection(struct connectdata * conn)
static CURLcode ftps_setup_connection(struct connectdata * conn)
{
struct SessionHandle *data = conn->data;
conn->ssl[SECONDARYSOCKET].use = data->set.ftp_ssl != CURLUSESSL_CONTROL;
return Curl_ftp_setup_connection(conn);
return ftp_setup_connection(conn);
}
#endif

View File

@ -109,9 +109,9 @@
* Forward declarations.
*/
static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done);
static CURLcode https_connecting(struct connectdata *conn, bool *done);
#ifdef USE_SSL
static int Curl_https_getsock(struct connectdata *conn,
static int https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks);
#endif
@ -146,9 +146,9 @@ const struct Curl_handler Curl_handler_https = {
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
Curl_http_connect, /* connect_it */
Curl_https_connecting, /* connecting */
https_connecting, /* connecting */
ZERO_NULL, /* doing */
Curl_https_getsock, /* proto_getsock */
https_getsock, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
ZERO_NULL, /* disconnect */
PORT_HTTPS, /* defport */
@ -176,12 +176,12 @@ static char *checkheaders(struct SessionHandle *data, const char *thisheader)
}
/*
* Curl_output_basic() sets up an Authorization: header (or the proxy version)
* http_output_basic() sets up an Authorization: header (or the proxy version)
* for HTTP Basic authentication.
*
* Returns CURLcode.
*/
static CURLcode Curl_output_basic(struct connectdata *conn, bool proxy)
static CURLcode http_output_basic(struct connectdata *conn, bool proxy)
{
char *authorization;
struct SessionHandle *data=conn->data;
@ -435,11 +435,11 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
* @returns CURLcode
*/
static CURLcode
Curl_http_output_auth(struct connectdata *conn,
const char *request,
const char *path,
bool proxytunnel) /* TRUE if this is the request setting
up the proxy tunnel */
http_output_auth(struct connectdata *conn,
const char *request,
const char *path,
bool proxytunnel) /* TRUE if this is the request setting
up the proxy tunnel */
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
@ -502,11 +502,11 @@ Curl_http_output_auth(struct connectdata *conn,
if(conn->bits.proxy_user_passwd &&
!checkheaders(data, "Proxy-authorization:")) {
auth="Basic";
result = Curl_output_basic(conn, TRUE);
result = http_output_basic(conn, TRUE);
if(result)
return result;
}
/* NOTE: Curl_output_basic() should set 'done' TRUE, as the other auth
/* NOTE: http_output_basic() should set 'done' TRUE, as the other auth
functions work that way */
authproxy->done = TRUE;
}
@ -582,7 +582,7 @@ Curl_http_output_auth(struct connectdata *conn,
if(conn->bits.user_passwd &&
!checkheaders(data, "Authorization:")) {
auth="Basic";
result = Curl_output_basic(conn, FALSE);
result = http_output_basic(conn, FALSE);
if(result)
return result;
}
@ -1264,7 +1264,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
}
/* Setup the proxy-authorization header, if any */
result = Curl_http_output_auth(conn, (char *)"CONNECT", host_port, TRUE);
result = http_output_auth(conn, (char *)"CONNECT", host_port, TRUE);
if(CURLE_OK == result) {
char *host=(char *)"";
@ -1682,7 +1682,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
if(conn->protocol & PROT_HTTPS) {
/* perform SSL initialization */
if(data->state.used_interface == Curl_if_multi) {
result = Curl_https_connecting(conn, done);
result = https_connecting(conn, done);
if(result)
return result;
}
@ -1701,7 +1701,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
return CURLE_OK;
}
static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done)
static CURLcode https_connecting(struct connectdata *conn, bool *done)
{
CURLcode result;
DEBUGASSERT((conn) && (conn->protocol & PROT_HTTPS));
@ -1717,7 +1717,7 @@ static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done)
#ifdef USE_SSLEAY
/* This function is OpenSSL-specific. It should be made to query the generic
SSL layer instead. */
static int Curl_https_getsock(struct connectdata *conn,
static int https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
{
@ -1742,7 +1742,7 @@ static int Curl_https_getsock(struct connectdata *conn,
}
#else
#ifdef USE_GNUTLS
int Curl_https_getsock(struct connectdata *conn,
int https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
{
@ -1753,7 +1753,7 @@ int Curl_https_getsock(struct connectdata *conn,
}
#else
#ifdef USE_NSS
int Curl_https_getsock(struct connectdata *conn,
int https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
{
@ -1764,7 +1764,7 @@ int Curl_https_getsock(struct connectdata *conn,
}
#else
#ifdef USE_QSOSSL
int Curl_https_getsock(struct connectdata *conn,
int https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
{
@ -1979,7 +1979,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
}
/* setup the authentication headers */
result = Curl_http_output_auth(conn, request, ppath, FALSE);
result = http_output_auth(conn, request, ppath, FALSE);
if(result)
return result;

View File

@ -84,7 +84,7 @@
#include <curl/curl.h>
static time_t Curl_parsedate(const char *date);
static time_t parsedate(const char *date);
const char * const Curl_wkday[] =
{"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"};
@ -223,7 +223,7 @@ enum assume {
DATE_TIME
};
static time_t Curl_parsedate(const char *date)
static time_t parsedate(const char *date)
{
time_t t = 0;
int wdaynum=-1; /* day of the week number, 0-6 (mon-sun) */
@ -421,5 +421,5 @@ static time_t Curl_parsedate(const char *date)
time_t curl_getdate(const char *p, const time_t *now)
{
(void)now;
return Curl_parsedate(p);
return parsedate(p);
}

View File

@ -310,10 +310,10 @@ CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn,
return res;
}
static ssize_t Curl_plain_send(struct connectdata *conn,
int num,
void *mem,
size_t len)
static ssize_t send_plain(struct connectdata *conn,
int num,
void *mem,
size_t len)
{
curl_socket_t sockfd = conn->sock[num];
ssize_t bytes_written = swrite(sockfd, mem, len);
@ -368,7 +368,7 @@ CURLcode Curl_write(struct connectdata *conn,
/* only TRUE if krb enabled */
bytes_written = Curl_sec_send(conn, num, mem, len);
else
bytes_written = Curl_plain_send(conn, num, mem, len);
bytes_written = send_plain(conn, num, mem, len);
*written = bytes_written;
retcode = (-1 != bytes_written)?CURLE_OK:CURLE_SEND_ERROR;

View File

@ -850,9 +850,9 @@ int Curl_ossl_close_all(struct SessionHandle *data)
return 0;
}
static int Curl_ASN1_UTCTIME_output(struct connectdata *conn,
const char *prefix,
const ASN1_UTCTIME *tm)
static int asn1_output(struct connectdata *conn,
const char *prefix,
const ASN1_UTCTIME *tm)
{
const char *asn1_string;
int gmt=FALSE;
@ -1256,8 +1256,8 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
/* ====================================================== */
static CURLcode
Curl_ossl_connect_step1(struct connectdata *conn,
int sockindex)
ossl_connect_step1(struct connectdata *conn,
int sockindex)
{
CURLcode retcode = CURLE_OK;
@ -1443,8 +1443,8 @@ Curl_ossl_connect_step1(struct connectdata *conn,
}
static CURLcode
Curl_ossl_connect_step2(struct connectdata *conn,
int sockindex, long *timeout_ms)
ossl_connect_step2(struct connectdata *conn,
int sockindex, long *timeout_ms)
{
struct SessionHandle *data = conn->data;
int err;
@ -1607,10 +1607,10 @@ static CURLcode servercert(struct connectdata *conn,
CRYPTO_free(str);
certdate = X509_get_notBefore(connssl->server_cert);
Curl_ASN1_UTCTIME_output(conn, "\t start date: ", certdate);
asn1_output(conn, "\t start date: ", certdate);
certdate = X509_get_notAfter(connssl->server_cert);
Curl_ASN1_UTCTIME_output(conn, "\t expire date: ", certdate);
asn1_output(conn, "\t expire date: ", certdate);
if(data->set.ssl.verifyhost) {
retcode = verifyhost(conn, connssl->server_cert);
@ -1664,8 +1664,8 @@ static CURLcode servercert(struct connectdata *conn,
static CURLcode
Curl_ossl_connect_step3(struct connectdata *conn,
int sockindex)
ossl_connect_step3(struct connectdata *conn,
int sockindex)
{
CURLcode retcode = CURLE_OK;
void *ssl_sessionid=NULL;
@ -1724,10 +1724,10 @@ Curl_ossl_connect_step3(struct connectdata *conn,
}
static CURLcode
Curl_ossl_connect_common(struct connectdata *conn,
int sockindex,
bool nonblocking,
bool *done)
ossl_connect_common(struct connectdata *conn,
int sockindex,
bool nonblocking,
bool *done)
{
CURLcode retcode;
struct SessionHandle *data = conn->data;
@ -1736,7 +1736,7 @@ Curl_ossl_connect_common(struct connectdata *conn,
long timeout_ms;
if(ssl_connect_1==connssl->connecting_state) {
retcode = Curl_ossl_connect_step1(conn, sockindex);
retcode = ossl_connect_step1(conn, sockindex);
if(retcode)
return retcode;
}
@ -1780,7 +1780,7 @@ Curl_ossl_connect_common(struct connectdata *conn,
}
/* get the timeout from step2 to avoid computing it twice. */
retcode = Curl_ossl_connect_step2(conn, sockindex, &timeout_ms);
retcode = ossl_connect_step2(conn, sockindex, &timeout_ms);
if(retcode)
return retcode;
@ -1788,7 +1788,7 @@ Curl_ossl_connect_common(struct connectdata *conn,
if(ssl_connect_3==connssl->connecting_state) {
retcode = Curl_ossl_connect_step3(conn, sockindex);
retcode = ossl_connect_step3(conn, sockindex);
if(retcode)
return retcode;
}
@ -1811,7 +1811,7 @@ Curl_ossl_connect_nonblocking(struct connectdata *conn,
int sockindex,
bool *done)
{
return Curl_ossl_connect_common(conn, sockindex, TRUE, done);
return ossl_connect_common(conn, sockindex, TRUE, done);
}
CURLcode
@ -1821,7 +1821,7 @@ Curl_ossl_connect(struct connectdata *conn,
CURLcode retcode;
bool done = FALSE;
retcode = Curl_ossl_connect_common(conn, sockindex, FALSE, &done);
retcode = ossl_connect_common(conn, sockindex, FALSE, &done);
if(retcode)
return retcode;

View File

@ -125,8 +125,8 @@ static void printsub(struct SessionHandle *data,
size_t length);
static void suboption(struct connectdata *);
static CURLcode Curl_telnet(struct connectdata *conn, bool *done);
static CURLcode Curl_telnet_done(struct connectdata *conn,
static CURLcode telnet_do(struct connectdata *conn, bool *done);
static CURLcode telnet_done(struct connectdata *conn,
CURLcode, bool premature);
/* For negotiation compliant to RFC 1143 */
@ -182,8 +182,8 @@ struct TELNET {
const struct Curl_handler Curl_handler_telnet = {
"TELNET", /* scheme */
ZERO_NULL, /* setup_connection */
Curl_telnet, /* do_it */
Curl_telnet_done, /* done */
telnet_do, /* do_it */
telnet_done, /* done */
ZERO_NULL, /* do_more */
ZERO_NULL, /* connect_it */
ZERO_NULL, /* connecting */
@ -1117,7 +1117,7 @@ void telrcv(struct connectdata *conn,
bufferflush();
}
static CURLcode Curl_telnet_done(struct connectdata *conn,
static CURLcode telnet_done(struct connectdata *conn,
CURLcode status, bool premature)
{
struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
@ -1132,7 +1132,7 @@ static CURLcode Curl_telnet_done(struct connectdata *conn,
return CURLE_OK;
}
static CURLcode Curl_telnet(struct connectdata *conn, bool *done)
static CURLcode telnet_do(struct connectdata *conn, bool *done)
{
CURLcode code;
struct SessionHandle *data = conn->data;

View File

@ -151,11 +151,11 @@ typedef struct tftp_state_data {
/* Forward declarations */
static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event) ;
static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) ;
static CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done);
static CURLcode Curl_tftp(struct connectdata *conn, bool *done);
static CURLcode Curl_tftp_done(struct connectdata *conn,
static CURLcode tftp_connect(struct connectdata *conn, bool *done);
static CURLcode tftp_do(struct connectdata *conn, bool *done);
static CURLcode tftp_done(struct connectdata *conn,
CURLcode, bool premature);
static CURLcode Curl_tftp_setup_connection(struct connectdata * conn);
static CURLcode tftp_setup_connection(struct connectdata * conn);
/*
@ -164,11 +164,11 @@ static CURLcode Curl_tftp_setup_connection(struct connectdata * conn);
const struct Curl_handler Curl_handler_tftp = {
"TFTP", /* scheme */
Curl_tftp_setup_connection, /* setup_connection */
Curl_tftp, /* do_it */
Curl_tftp_done, /* done */
tftp_setup_connection, /* setup_connection */
tftp_do, /* do_it */
tftp_done, /* done */
ZERO_NULL, /* do_more */
Curl_tftp_connect, /* connect_it */
tftp_connect, /* connect_it */
ZERO_NULL, /* connecting */
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
@ -598,12 +598,12 @@ static CURLcode tftp_state_machine(tftp_state_data_t *state,
/**********************************************************
*
* Curl_tftp_connect
* tftp_connect
*
* The connect callback
*
**********************************************************/
static CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done)
static CURLcode tftp_connect(struct connectdata *conn, bool *done)
{
CURLcode code;
tftp_state_data_t *state;
@ -665,12 +665,12 @@ static CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done)
/**********************************************************
*
* Curl_tftp_done
* tftp_done
*
* The done callback
*
**********************************************************/
static CURLcode Curl_tftp_done(struct connectdata *conn, CURLcode status,
static CURLcode tftp_done(struct connectdata *conn, CURLcode status,
bool premature)
{
(void)status; /* unused */
@ -684,7 +684,7 @@ static CURLcode Curl_tftp_done(struct connectdata *conn, CURLcode status,
/**********************************************************
*
* Curl_tftp
* tftp
*
* The do callback
*
@ -692,7 +692,7 @@ static CURLcode Curl_tftp_done(struct connectdata *conn, CURLcode status,
*
**********************************************************/
static CURLcode Curl_tftp(struct connectdata *conn, bool *done)
static CURLcode tftp_do(struct connectdata *conn, bool *done)
{
struct SessionHandle *data = conn->data;
tftp_state_data_t *state;
@ -710,12 +710,12 @@ static CURLcode Curl_tftp(struct connectdata *conn, bool *done)
Since connections can be re-used between SessionHandles, this might be a
connection already existing but on a fresh SessionHandle struct so we must
make sure we have a good 'struct TFTP' to play with. For new connections,
the struct TFTP is allocated and setup in the Curl_tftp_connect() function.
the struct TFTP is allocated and setup in the tftp_connect() function.
*/
Curl_reset_reqproto(conn);
if(!data->state.proto.tftp) {
code = Curl_tftp_connect(conn, done);
code = tftp_connect(conn, done);
if(code)
return code;
}
@ -864,7 +864,7 @@ static CURLcode Curl_tftp(struct connectdata *conn, bool *done)
return code;
}
static CURLcode Curl_tftp_setup_connection(struct connectdata * conn)
static CURLcode tftp_setup_connection(struct connectdata * conn)
{
struct SessionHandle *data = conn->data;
char * type;

View File

@ -2219,8 +2219,8 @@ CURLcode Curl_follow(struct SessionHandle *data,
}
static CURLcode
Curl_connect_host(struct SessionHandle *data,
struct connectdata **conn)
connect_host(struct SessionHandle *data,
struct connectdata **conn)
{
CURLcode res = CURLE_OK;
int urlchanged = FALSE;
@ -2327,7 +2327,7 @@ CURLcode Curl_perform(struct SessionHandle *data)
*/
do {
res = Curl_connect_host(data, &conn); /* primary connection */
res = connect_host(data, &conn); /* primary connection */
if(res == CURLE_OK) {
bool do_done;

View File

@ -298,7 +298,7 @@ void Curl_freeset(struct SessionHandle * data)
Curl_safefree(data->set.str[i]);
}
static CURLcode Curl_setstropt(char **charp, char * s)
static CURLcode setstropt(char **charp, char * s)
{
/* Release the previous storage at `charp' and replace by a dynamic storage
copy of `s'. Return CURLE_OK or CURLE_OUT_OF_MEMORY. */
@ -334,7 +334,7 @@ CURLcode Curl_dupset(struct SessionHandle * dst, struct SessionHandle * src)
/* duplicate all strings */
for(i=(enum dupstring)0; i< STRING_LAST; i++) {
r = Curl_setstropt(&dst->set.str[i], src->set.str[i]);
r = setstropt(&dst->set.str[i], src->set.str[i]);
if(r != CURLE_OK)
break;
}
@ -743,7 +743,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
data->set.ssl.sessionid = TRUE; /* session ID caching enabled by default */
#ifdef CURL_CA_BUNDLE
/* This is our preferred CA cert bundle since install time */
res = Curl_setstropt(&data->set.str[STRING_SSL_CAFILE],
res = setstropt(&data->set.str[STRING_SSL_CAFILE],
(char *) CURL_CA_BUNDLE);
#endif
}
@ -786,7 +786,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
break;
case CURLOPT_SSL_CIPHER_LIST:
/* set a list of cipher we want to use in the SSL connection */
result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST],
result = setstropt(&data->set.str[STRING_SSL_CIPHER_LIST],
va_arg(param, char *));
break;
@ -795,14 +795,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* This is the path name to a file that contains random data to seed
* the random SSL stuff with. The file is only used for reading.
*/
result = Curl_setstropt(&data->set.str[STRING_SSL_RANDOM_FILE],
result = setstropt(&data->set.str[STRING_SSL_RANDOM_FILE],
va_arg(param, char *));
break;
case CURLOPT_EGDSOCKET:
/*
* The Entropy Gathering Daemon socket pathname
*/
result = Curl_setstropt(&data->set.str[STRING_SSL_EGDSOCKET],
result = setstropt(&data->set.str[STRING_SSL_EGDSOCKET],
va_arg(param, char *));
break;
case CURLOPT_MAXCONNECTS:
@ -926,7 +926,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Use this file instead of the $HOME/.netrc file
*/
result = Curl_setstropt(&data->set.str[STRING_NETRC_FILE],
result = setstropt(&data->set.str[STRING_NETRC_FILE],
va_arg(param, char *));
break;
case CURLOPT_TRANSFERTEXT:
@ -979,7 +979,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*
*/
argptr = va_arg(param, char *);
result = Curl_setstropt(&data->set.str[STRING_ENCODING],
result = setstropt(&data->set.str[STRING_ENCODING],
(argptr && !*argptr)?
(char *) ALL_CONTENT_ENCODINGS: argptr);
break;
@ -1036,7 +1036,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
argptr = va_arg(param, char *);
if(!argptr || data->set.postfieldsize == -1)
result = Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], argptr);
result = setstropt(&data->set.str[STRING_COPYPOSTFIELDS], argptr);
else {
/*
* Check that requested length does not overflow the size_t type.
@ -1049,7 +1049,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
else {
char * p;
(void) Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL);
(void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL);
/* Allocate even when size == 0. This satisfies the need of possible
later address compare to detect the COPYPOSTFIELDS mode, and
@ -1079,7 +1079,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data->set.postfields = va_arg(param, void *);
/* Release old copied data. */
(void) Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL);
(void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL);
data->set.httpreq = HTTPREQ_POST;
break;
@ -1093,7 +1093,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
if(data->set.postfieldsize < bigsize &&
data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) {
/* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */
(void) Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL);
(void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL);
data->set.postfields = NULL;
}
@ -1110,7 +1110,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
if(data->set.postfieldsize < bigsize &&
data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) {
/* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */
(void) Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL);
(void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL);
data->set.postfields = NULL;
}
@ -1134,7 +1134,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
free(data->change.referer);
data->change.referer_alloc = FALSE;
}
result = Curl_setstropt(&data->set.str[STRING_SET_REFERER],
result = setstropt(&data->set.str[STRING_SET_REFERER],
va_arg(param, char *));
data->change.referer = data->set.str[STRING_SET_REFERER];
break;
@ -1143,7 +1143,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* String to use in the HTTP User-Agent field
*/
result = Curl_setstropt(&data->set.str[STRING_USERAGENT],
result = setstropt(&data->set.str[STRING_USERAGENT],
va_arg(param, char *));
break;
@ -1166,7 +1166,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Cookie string to send to the remote server in the request.
*/
result = Curl_setstropt(&data->set.str[STRING_COOKIE],
result = setstropt(&data->set.str[STRING_COOKIE],
va_arg(param, char *));
break;
@ -1192,7 +1192,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Set cookie file name to dump all cookies to when we're done.
*/
result = Curl_setstropt(&data->set.str[STRING_COOKIEJAR],
result = setstropt(&data->set.str[STRING_COOKIEJAR],
va_arg(param, char *));
/*
@ -1296,7 +1296,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Set a custom string to use as request
*/
result = Curl_setstropt(&data->set.str[STRING_CUSTOMREQUEST],
result = setstropt(&data->set.str[STRING_CUSTOMREQUEST],
va_arg(param, char *));
/* we don't set
@ -1363,7 +1363,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Setting it to NULL, means no proxy but allows the environment variables
* to decide for us.
*/
result = Curl_setstropt(&data->set.str[STRING_PROXY],
result = setstropt(&data->set.str[STRING_PROXY],
va_arg(param, char *));
break;
@ -1390,7 +1390,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Use FTP PORT, this also specifies which IP address to use
*/
result = Curl_setstropt(&data->set.str[STRING_FTPPORT],
result = setstropt(&data->set.str[STRING_FTPPORT],
va_arg(param, char *));
data->set.ftp_use_port = (bool)(NULL != data->set.str[STRING_FTPPORT]);
break;
@ -1475,7 +1475,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
free(data->change.url);
data->change.url_alloc=FALSE;
}
result = Curl_setstropt(&data->set.str[STRING_SET_URL],
result = setstropt(&data->set.str[STRING_SET_URL],
va_arg(param, char *));
data->change.url = data->set.str[STRING_SET_URL];
if(data->change.url)
@ -1514,7 +1514,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* user:password to use in the operation
*/
result = Curl_setstropt(&data->set.str[STRING_USERPWD],
result = setstropt(&data->set.str[STRING_USERPWD],
va_arg(param, char *));
break;
case CURLOPT_POSTQUOTE:
@ -1556,14 +1556,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* user:password needed to use the proxy
*/
result = Curl_setstropt(&data->set.str[STRING_PROXYUSERPWD],
result = setstropt(&data->set.str[STRING_PROXYUSERPWD],
va_arg(param, char *));
break;
case CURLOPT_RANGE:
/*
* What range of the file you want to transfer
*/
result = Curl_setstropt(&data->set.str[STRING_SET_RANGE],
result = setstropt(&data->set.str[STRING_SET_RANGE],
va_arg(param, char *));
break;
case CURLOPT_RESUME_FROM:
@ -1661,35 +1661,35 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* String that holds file name of the SSL certificate to use
*/
result = Curl_setstropt(&data->set.str[STRING_CERT],
result = setstropt(&data->set.str[STRING_CERT],
va_arg(param, char *));
break;
case CURLOPT_SSLCERTTYPE:
/*
* String that holds file type of the SSL certificate to use
*/
result = Curl_setstropt(&data->set.str[STRING_CERT_TYPE],
result = setstropt(&data->set.str[STRING_CERT_TYPE],
va_arg(param, char *));
break;
case CURLOPT_SSLKEY:
/*
* String that holds file name of the SSL certificate to use
*/
result = Curl_setstropt(&data->set.str[STRING_KEY],
result = setstropt(&data->set.str[STRING_KEY],
va_arg(param, char *));
break;
case CURLOPT_SSLKEYTYPE:
/*
* String that holds file type of the SSL certificate to use
*/
result = Curl_setstropt(&data->set.str[STRING_KEY_TYPE],
result = setstropt(&data->set.str[STRING_KEY_TYPE],
va_arg(param, char *));
break;
case CURLOPT_KEYPASSWD:
/*
* String that holds the SSL or SSH private key password.
*/
result = Curl_setstropt(&data->set.str[STRING_KEY_PASSWD],
result = setstropt(&data->set.str[STRING_KEY_PASSWD],
va_arg(param, char *));
break;
case CURLOPT_SSLENGINE:
@ -1719,7 +1719,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Set what interface or address/hostname to bind the socket to when
* performing an operation and thus what from-IP your connection will use.
*/
result = Curl_setstropt(&data->set.str[STRING_DEVICE],
result = setstropt(&data->set.str[STRING_DEVICE],
va_arg(param, char *));
break;
case CURLOPT_LOCALPORT:
@ -1738,7 +1738,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* A string that defines the kerberos security level.
*/
result = Curl_setstropt(&data->set.str[STRING_KRB_LEVEL],
result = setstropt(&data->set.str[STRING_KRB_LEVEL],
va_arg(param, char *));
data->set.krb = (bool)(NULL != data->set.str[STRING_KRB_LEVEL]);
break;
@ -1770,7 +1770,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Set CA info for SSL connection. Specify file name of the CA certificate
*/
result = Curl_setstropt(&data->set.str[STRING_SSL_CAFILE],
result = setstropt(&data->set.str[STRING_SSL_CAFILE],
va_arg(param, char *));
break;
case CURLOPT_CAPATH:
@ -1779,7 +1779,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* certificates which have been prepared using openssl c_rehash utility.
*/
/* This does not work on windows. */
result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH],
result = setstropt(&data->set.str[STRING_SSL_CAPATH],
va_arg(param, char *));
break;
case CURLOPT_TELNETOPTIONS:
@ -1929,7 +1929,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
These former 3rd party transfer options are deprecated */
case CURLOPT_FTP_ACCOUNT:
result = Curl_setstropt(&data->set.str[STRING_FTP_ACCOUNT],
result = setstropt(&data->set.str[STRING_FTP_ACCOUNT],
va_arg(param, char *));
break;
@ -1945,7 +1945,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
break;
case CURLOPT_FTP_ALTERNATIVE_TO_USER:
result = Curl_setstropt(&data->set.str[STRING_FTP_ALTERNATIVE_TO_USER],
result = setstropt(&data->set.str[STRING_FTP_ALTERNATIVE_TO_USER],
va_arg(param, char *));
break;
@ -1990,7 +1990,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Use this file instead of the $HOME/.ssh/id_dsa.pub file
*/
result = Curl_setstropt(&data->set.str[STRING_SSH_PUBLIC_KEY],
result = setstropt(&data->set.str[STRING_SSH_PUBLIC_KEY],
va_arg(param, char *));
break;
@ -1998,7 +1998,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Use this file instead of the $HOME/.ssh/id_dsa file
*/
result = Curl_setstropt(&data->set.str[STRING_SSH_PRIVATE_KEY],
result = setstropt(&data->set.str[STRING_SSH_PRIVATE_KEY],
va_arg(param, char *));
break;
case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
@ -2006,7 +2006,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Option to allow for the MD5 of the host public key to be checked
* for validation purposes.
*/
result = Curl_setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5],
result = setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5],
va_arg(param, char *));
break;
case CURLOPT_HTTP_TRANSFER_DECODING: