Loading lib/dict.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -87,7 +87,7 @@ * Forward declarations. * Forward declarations. */ */ static CURLcode Curl_dict(struct connectdata *conn, bool *done); static CURLcode dict_do(struct connectdata *conn, bool *done); /* /* * DICT protocol handler. * DICT protocol handler. Loading @@ -96,7 +96,7 @@ static CURLcode Curl_dict(struct connectdata *conn, bool *done); const struct Curl_handler Curl_handler_dict = { const struct Curl_handler Curl_handler_dict = { "DICT", /* scheme */ "DICT", /* scheme */ ZERO_NULL, /* setup_connection */ ZERO_NULL, /* setup_connection */ Curl_dict, /* do_it */ dict_do, /* do_it */ ZERO_NULL, /* done */ ZERO_NULL, /* done */ ZERO_NULL, /* do_more */ ZERO_NULL, /* do_more */ ZERO_NULL, /* connect_it */ ZERO_NULL, /* connect_it */ Loading Loading @@ -142,7 +142,7 @@ static char *unescape_word(struct SessionHandle *data, const char *inp) return dictp; return dictp; } } static CURLcode Curl_dict(struct connectdata *conn, bool *done) static CURLcode dict_do(struct connectdata *conn, bool *done) { { char *word; char *word; char *eword; char *eword; Loading lib/file.c +13 −13 Original line number Original line Diff line number Diff line Loading @@ -94,10 +94,10 @@ * Forward declarations. * Forward declarations. */ */ static CURLcode Curl_file(struct connectdata *, bool *done); static CURLcode file_do(struct connectdata *, bool *done); static CURLcode Curl_file_done(struct connectdata *conn, static CURLcode file_done(struct connectdata *conn, CURLcode status, bool premature); CURLcode status, bool premature); static CURLcode Curl_file_connect(struct connectdata *conn, bool *done); static CURLcode file_connect(struct connectdata *conn, bool *done); /* /* * FILE scheme handler. * FILE scheme handler. Loading @@ -106,10 +106,10 @@ static CURLcode Curl_file_connect(struct connectdata *conn, bool *done); const struct Curl_handler Curl_handler_file = { const struct Curl_handler Curl_handler_file = { "FILE", /* scheme */ "FILE", /* scheme */ ZERO_NULL, /* setup_connection */ ZERO_NULL, /* setup_connection */ Curl_file, /* do_it */ file_do, /* do_it */ Curl_file_done, /* done */ file_done, /* done */ ZERO_NULL, /* do_more */ ZERO_NULL, /* do_more */ Curl_file_connect, /* connect_it */ file_connect, /* connect_it */ ZERO_NULL, /* connecting */ ZERO_NULL, /* connecting */ ZERO_NULL, /* doing */ ZERO_NULL, /* doing */ ZERO_NULL, /* proto_getsock */ ZERO_NULL, /* proto_getsock */ Loading @@ -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 * do protocol-specific actions at connect-time. We emulate a * connect-then-transfer protocol and "connect" to the file here * 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; struct SessionHandle *data = conn->data; char *real_path = curl_easy_unescape(data, data->state.path, 0, NULL); char *real_path = curl_easy_unescape(data, data->state.path, 0, NULL); Loading Loading @@ -201,7 +201,7 @@ static CURLcode Curl_file_connect(struct connectdata *conn, bool *done) file->fd = fd; file->fd = fd; if(!data->set.upload && (fd == -1)) { if(!data->set.upload && (fd == -1)) { failf(data, "Couldn't open file %s", data->state.path); 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; return CURLE_FILE_COULDNT_READ_FILE; } } *done = TRUE; *done = TRUE; Loading @@ -209,7 +209,7 @@ static CURLcode Curl_file_connect(struct connectdata *conn, bool *done) return CURLE_OK; return CURLE_OK; } } static CURLcode Curl_file_done(struct connectdata *conn, static CURLcode file_done(struct connectdata *conn, CURLcode status, bool premature) CURLcode status, bool premature) { { struct FILEPROTO *file = conn->data->state.proto.file; struct FILEPROTO *file = conn->data->state.proto.file; Loading Loading @@ -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 * 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 * 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 * 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 * opposed to sockets) we instead perform the whole do-operation in this * function. * 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 /* This implementation ignores the host name in conformance with RFC 1738. Only local files (reachable via the standard file system) RFC 1738. Only local files (reachable via the standard file system) Loading lib/ftp.c +55 −55 Original line number Original line Diff line number Diff line Loading @@ -134,21 +134,21 @@ static CURLcode ftp_nb_type(struct connectdata *conn, bool ascii, ftpstate newstate); bool ascii, ftpstate newstate); static int ftp_need_type(struct connectdata *conn, static int ftp_need_type(struct connectdata *conn, bool ascii); bool ascii); static CURLcode Curl_ftp(struct connectdata *conn, bool *done); static CURLcode ftp_do(struct connectdata *conn, bool *done); static CURLcode Curl_ftp_done(struct connectdata *conn, static CURLcode ftp_done(struct connectdata *conn, CURLcode, bool premature); CURLcode, bool premature); static CURLcode Curl_ftp_connect(struct connectdata *conn, bool *done); static CURLcode ftp_connect(struct connectdata *conn, bool *done); static CURLcode Curl_ftp_disconnect(struct connectdata *conn); static CURLcode ftp_disconnect(struct connectdata *conn); static CURLcode Curl_ftp_nextconnect(struct connectdata *conn); static CURLcode ftp_nextconnect(struct connectdata *conn); static CURLcode Curl_ftp_multi_statemach(struct connectdata *conn, bool *done); static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done); static int Curl_ftp_getsock(struct connectdata *conn, static int ftp_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks); int numsocks); static CURLcode Curl_ftp_doing(struct connectdata *conn, static CURLcode ftp_doing(struct connectdata *conn, bool *dophase_done); bool *dophase_done); static CURLcode Curl_ftp_setup_connection(struct connectdata * conn); static CURLcode ftp_setup_connection(struct connectdata * conn); #ifdef USE_SSL #ifdef USE_SSL static CURLcode Curl_ftps_setup_connection(struct connectdata * conn); static CURLcode ftps_setup_connection(struct connectdata * conn); #endif #endif /* easy-to-use macro: */ /* easy-to-use macro: */ Loading @@ -164,16 +164,16 @@ static CURLcode Curl_ftps_setup_connection(struct connectdata * conn); const struct Curl_handler Curl_handler_ftp = { const struct Curl_handler Curl_handler_ftp = { "FTP", /* scheme */ "FTP", /* scheme */ Curl_ftp_setup_connection, /* setup_connection */ ftp_setup_connection, /* setup_connection */ Curl_ftp, /* do_it */ ftp_do, /* do_it */ Curl_ftp_done, /* done */ ftp_done, /* done */ Curl_ftp_nextconnect, /* do_more */ ftp_nextconnect, /* do_more */ Curl_ftp_connect, /* connect_it */ ftp_connect, /* connect_it */ Curl_ftp_multi_statemach, /* connecting */ ftp_multi_statemach, /* connecting */ Curl_ftp_doing, /* doing */ ftp_doing, /* doing */ Curl_ftp_getsock, /* proto_getsock */ ftp_getsock, /* proto_getsock */ Curl_ftp_getsock, /* doing_getsock */ ftp_getsock, /* doing_getsock */ Curl_ftp_disconnect, /* disconnect */ ftp_disconnect, /* disconnect */ PORT_FTP, /* defport */ PORT_FTP, /* defport */ PROT_FTP /* protocol */ PROT_FTP /* protocol */ }; }; Loading @@ -186,16 +186,16 @@ const struct Curl_handler Curl_handler_ftp = { const struct Curl_handler Curl_handler_ftps = { const struct Curl_handler Curl_handler_ftps = { "FTPS", /* scheme */ "FTPS", /* scheme */ Curl_ftps_setup_connection, /* setup_connection */ ftps_setup_connection, /* setup_connection */ Curl_ftp, /* do_it */ ftp_do, /* do_it */ Curl_ftp_done, /* done */ ftp_done, /* done */ Curl_ftp_nextconnect, /* do_more */ ftp_nextconnect, /* do_more */ Curl_ftp_connect, /* connect_it */ ftp_connect, /* connect_it */ Curl_ftp_multi_statemach, /* connecting */ ftp_multi_statemach, /* connecting */ Curl_ftp_doing, /* doing */ ftp_doing, /* doing */ Curl_ftp_getsock, /* proto_getsock */ ftp_getsock, /* proto_getsock */ Curl_ftp_getsock, /* doing_getsock */ ftp_getsock, /* doing_getsock */ Curl_ftp_disconnect, /* disconnect */ ftp_disconnect, /* disconnect */ PORT_FTPS, /* defport */ PORT_FTPS, /* defport */ PROT_FTP | PROT_FTPS | PROT_SSL /* protocol */ PROT_FTP | PROT_FTPS | PROT_SSL /* protocol */ }; }; Loading Loading @@ -810,7 +810,7 @@ static CURLcode ftp_state_pwd(struct connectdata *conn) } } /* For the FTP "protocol connect" and "doing" phases only */ /* 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, curl_socket_t *socks, int numsocks) int numsocks) { { Loading Loading @@ -1589,7 +1589,7 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn, result=Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); result=Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); /* Set ->transfer so that we won't get any error in /* 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; ftp->transfer = FTPTRANSFER_NONE; state(conn, FTP_STOP); state(conn, FTP_STOP); Loading Loading @@ -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); result = Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); infof(data, "File already completely downloaded\n"); 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 */ * because we didn't transfer the any file */ ftp->transfer = FTPTRANSFER_NONE; ftp->transfer = FTPTRANSFER_NONE; state(conn, FTP_STOP); state(conn, FTP_STOP); Loading Loading @@ -2930,7 +2930,7 @@ static long ftp_state_timeout(struct connectdata *conn) /* called repeatedly until done from multi.c */ /* 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) bool *done) { { curl_socket_t sock = conn->sock[FIRSTSOCKET]; curl_socket_t sock = conn->sock[FIRSTSOCKET]; Loading Loading @@ -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 connection phase. * * * The variable 'done' points to will be TRUE if the protocol-layer connect * 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 * 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. * 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 */ bool *done) /* see description above */ { { CURLcode result; CURLcode result; Loading Loading @@ -3107,7 +3107,7 @@ static CURLcode Curl_ftp_connect(struct connectdata *conn, ftpc->response = Curl_tvnow(); /* start response time-out now! */ ftpc->response = Curl_tvnow(); /* start response time-out now! */ if(data->state.used_interface == Curl_if_multi) if(data->state.used_interface == Curl_if_multi) result = Curl_ftp_multi_statemach(conn, done); result = ftp_multi_statemach(conn, done); else { else { result = ftp_easy_statemach(conn); result = ftp_easy_statemach(conn); if(!result) if(!result) Loading @@ -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 * The DONE function. This does what needs to be done after a single DO has * performed. * performed. * * * Input argument is already checked for validity. * 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) bool premature) { { struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data; Loading Loading @@ -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 * This function shall be called when the second FTP (data) connection is * connected. * connected. */ */ static CURLcode Curl_ftp_nextconnect(struct connectdata *conn) static CURLcode ftp_nextconnect(struct connectdata *conn) { { struct SessionHandle *data=conn->data; struct SessionHandle *data=conn->data; struct ftp_conn *ftpc = &conn->proto.ftpc; struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result = CURLE_OK; 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; struct FTP *ftp = data->state.proto.ftp; DEBUGF(infof(data, "DO-MORE phase starts\n")); DEBUGF(infof(data, "DO-MORE phase starts\n")); Loading Loading @@ -3574,7 +3574,7 @@ CURLcode ftp_perform(struct connectdata *conn, /* run the state-machine */ /* run the state-machine */ if(conn->data->state.used_interface == Curl_if_multi) 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 { else { result = ftp_easy_statemach(conn); result = ftp_easy_statemach(conn); *dophase_done = TRUE; /* with the easy interface we are done here */ *dophase_done = TRUE; /* with the easy interface we are done here */ Loading @@ -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 * This function is registered as 'curl_do' function. It decodes the path * parts etc as a wrapper to the actual DO function (ftp_perform). * parts etc as a wrapper to the actual DO function (ftp_perform). * * * The input argument is already checked for validity. * 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; CURLcode retcode = CURLE_OK; Loading @@ -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 Since connections can be re-used between SessionHandles, this might be a connection already existing but on a fresh SessionHandle struct so we must 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, 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); Curl_reset_reqproto(conn); retcode = ftp_init(conn); retcode = ftp_init(conn); Loading Loading @@ -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 * Disconnect from an FTP server. Cleanup protocol-specific per-connection * resources. BLOCKING. * resources. BLOCKING. */ */ static CURLcode Curl_ftp_disconnect(struct connectdata *conn) static CURLcode ftp_disconnect(struct connectdata *conn) { { struct ftp_conn *ftpc= &conn->proto.ftpc; struct ftp_conn *ftpc= &conn->proto.ftpc; Loading Loading @@ -4024,7 +4024,7 @@ static CURLcode ftp_dophase_done(struct connectdata *conn, struct ftp_conn *ftpc = &conn->proto.ftpc; struct ftp_conn *ftpc = &conn->proto.ftpc; if(connected) if(connected) result = Curl_ftp_nextconnect(conn); result = ftp_nextconnect(conn); if(result && (conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD)) { if(result && (conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD)) { /* Failure detected, close the second socket if it was created already */ /* Failure detected, close the second socket if it was created already */ Loading @@ -4046,11 +4046,11 @@ static CURLcode ftp_dophase_done(struct connectdata *conn, } } /* called from multi.c while DOing */ /* called from multi.c while DOing */ static CURLcode Curl_ftp_doing(struct connectdata *conn, static CURLcode ftp_doing(struct connectdata *conn, bool *dophase_done) bool *dophase_done) { { CURLcode result; CURLcode result; result = Curl_ftp_multi_statemach(conn, dophase_done); result = ftp_multi_statemach(conn, dophase_done); if(*dophase_done) { if(*dophase_done) { result = ftp_dophase_done(conn, FALSE /* not connected */); result = ftp_dophase_done(conn, FALSE /* not connected */); Loading @@ -4070,7 +4070,7 @@ static CURLcode Curl_ftp_doing(struct connectdata *conn, * remote host. * remote host. * * * ftp->ctl_valid starts out as FALSE, and gets set to TRUE if we reach the * 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 static CURLcode ftp_regular_transfer(struct connectdata *conn, CURLcode ftp_regular_transfer(struct connectdata *conn, Loading Loading @@ -4109,7 +4109,7 @@ CURLcode ftp_regular_transfer(struct connectdata *conn, return result; return result; } } static CURLcode Curl_ftp_setup_connection(struct connectdata * conn) static CURLcode ftp_setup_connection(struct connectdata * conn) { { struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data; char * type; char * type; Loading Loading @@ -4170,12 +4170,12 @@ static CURLcode Curl_ftp_setup_connection(struct connectdata * conn) } } #ifdef USE_SSL #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; struct SessionHandle *data = conn->data; conn->ssl[SECONDARYSOCKET].use = data->set.ftp_ssl != CURLUSESSL_CONTROL; conn->ssl[SECONDARYSOCKET].use = data->set.ftp_ssl != CURLUSESSL_CONTROL; return Curl_ftp_setup_connection(conn); return ftp_setup_connection(conn); } } #endif #endif Loading lib/http.c +22 −22 Original line number Original line Diff line number Diff line Loading @@ -109,9 +109,9 @@ * Forward declarations. * Forward declarations. */ */ static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done); static CURLcode https_connecting(struct connectdata *conn, bool *done); #ifdef USE_SSL #ifdef USE_SSL static int Curl_https_getsock(struct connectdata *conn, static int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks); int numsocks); #endif #endif Loading Loading @@ -146,9 +146,9 @@ const struct Curl_handler Curl_handler_https = { Curl_http_done, /* done */ Curl_http_done, /* done */ ZERO_NULL, /* do_more */ ZERO_NULL, /* do_more */ Curl_http_connect, /* connect_it */ Curl_http_connect, /* connect_it */ Curl_https_connecting, /* connecting */ https_connecting, /* connecting */ ZERO_NULL, /* doing */ ZERO_NULL, /* doing */ Curl_https_getsock, /* proto_getsock */ https_getsock, /* proto_getsock */ ZERO_NULL, /* doing_getsock */ ZERO_NULL, /* doing_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* disconnect */ PORT_HTTPS, /* defport */ PORT_HTTPS, /* defport */ Loading Loading @@ -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. * for HTTP Basic authentication. * * * Returns CURLcode. * Returns CURLcode. */ */ static CURLcode Curl_output_basic(struct connectdata *conn, bool proxy) static CURLcode http_output_basic(struct connectdata *conn, bool proxy) { { char *authorization; char *authorization; struct SessionHandle *data=conn->data; struct SessionHandle *data=conn->data; Loading Loading @@ -435,7 +435,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn) * @returns CURLcode * @returns CURLcode */ */ static CURLcode static CURLcode Curl_http_output_auth(struct connectdata *conn, http_output_auth(struct connectdata *conn, const char *request, const char *request, const char *path, const char *path, bool proxytunnel) /* TRUE if this is the request setting bool proxytunnel) /* TRUE if this is the request setting Loading Loading @@ -502,11 +502,11 @@ Curl_http_output_auth(struct connectdata *conn, if(conn->bits.proxy_user_passwd && if(conn->bits.proxy_user_passwd && !checkheaders(data, "Proxy-authorization:")) { !checkheaders(data, "Proxy-authorization:")) { auth="Basic"; auth="Basic"; result = Curl_output_basic(conn, TRUE); result = http_output_basic(conn, TRUE); if(result) if(result) return 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 */ functions work that way */ authproxy->done = TRUE; authproxy->done = TRUE; } } Loading Loading @@ -582,7 +582,7 @@ Curl_http_output_auth(struct connectdata *conn, if(conn->bits.user_passwd && if(conn->bits.user_passwd && !checkheaders(data, "Authorization:")) { !checkheaders(data, "Authorization:")) { auth="Basic"; auth="Basic"; result = Curl_output_basic(conn, FALSE); result = http_output_basic(conn, FALSE); if(result) if(result) return result; return result; } } Loading Loading @@ -1264,7 +1264,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, } } /* Setup the proxy-authorization header, if any */ /* 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) { if(CURLE_OK == result) { char *host=(char *)""; char *host=(char *)""; Loading Loading @@ -1682,7 +1682,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) if(conn->protocol & PROT_HTTPS) { if(conn->protocol & PROT_HTTPS) { /* perform SSL initialization */ /* perform SSL initialization */ if(data->state.used_interface == Curl_if_multi) { if(data->state.used_interface == Curl_if_multi) { result = Curl_https_connecting(conn, done); result = https_connecting(conn, done); if(result) if(result) return result; return result; } } Loading @@ -1701,7 +1701,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) return CURLE_OK; return CURLE_OK; } } static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done) static CURLcode https_connecting(struct connectdata *conn, bool *done) { { CURLcode result; CURLcode result; DEBUGASSERT((conn) && (conn->protocol & PROT_HTTPS)); DEBUGASSERT((conn) && (conn->protocol & PROT_HTTPS)); Loading @@ -1717,7 +1717,7 @@ static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done) #ifdef USE_SSLEAY #ifdef USE_SSLEAY /* This function is OpenSSL-specific. It should be made to query the generic /* This function is OpenSSL-specific. It should be made to query the generic SSL layer instead. */ SSL layer instead. */ static int Curl_https_getsock(struct connectdata *conn, static int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks) int numsocks) { { Loading @@ -1742,7 +1742,7 @@ static int Curl_https_getsock(struct connectdata *conn, } } #else #else #ifdef USE_GNUTLS #ifdef USE_GNUTLS int Curl_https_getsock(struct connectdata *conn, int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks) int numsocks) { { Loading @@ -1753,7 +1753,7 @@ int Curl_https_getsock(struct connectdata *conn, } } #else #else #ifdef USE_NSS #ifdef USE_NSS int Curl_https_getsock(struct connectdata *conn, int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks) int numsocks) { { Loading @@ -1764,7 +1764,7 @@ int Curl_https_getsock(struct connectdata *conn, } } #else #else #ifdef USE_QSOSSL #ifdef USE_QSOSSL int Curl_https_getsock(struct connectdata *conn, int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks) int numsocks) { { Loading Loading @@ -1979,7 +1979,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) } } /* setup the authentication headers */ /* setup the authentication headers */ result = Curl_http_output_auth(conn, request, ppath, FALSE); result = http_output_auth(conn, request, ppath, FALSE); if(result) if(result) return result; return result; Loading lib/parsedate.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -84,7 +84,7 @@ #include <curl/curl.h> #include <curl/curl.h> static time_t Curl_parsedate(const char *date); static time_t parsedate(const char *date); const char * const Curl_wkday[] = const char * const Curl_wkday[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; Loading Loading @@ -223,7 +223,7 @@ enum assume { DATE_TIME DATE_TIME }; }; static time_t Curl_parsedate(const char *date) static time_t parsedate(const char *date) { { time_t t = 0; time_t t = 0; int wdaynum=-1; /* day of the week number, 0-6 (mon-sun) */ int wdaynum=-1; /* day of the week number, 0-6 (mon-sun) */ Loading Loading @@ -421,5 +421,5 @@ static time_t Curl_parsedate(const char *date) time_t curl_getdate(const char *p, const time_t *now) time_t curl_getdate(const char *p, const time_t *now) { { (void)now; (void)now; return Curl_parsedate(p); return parsedate(p); } } Loading
lib/dict.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -87,7 +87,7 @@ * Forward declarations. * Forward declarations. */ */ static CURLcode Curl_dict(struct connectdata *conn, bool *done); static CURLcode dict_do(struct connectdata *conn, bool *done); /* /* * DICT protocol handler. * DICT protocol handler. Loading @@ -96,7 +96,7 @@ static CURLcode Curl_dict(struct connectdata *conn, bool *done); const struct Curl_handler Curl_handler_dict = { const struct Curl_handler Curl_handler_dict = { "DICT", /* scheme */ "DICT", /* scheme */ ZERO_NULL, /* setup_connection */ ZERO_NULL, /* setup_connection */ Curl_dict, /* do_it */ dict_do, /* do_it */ ZERO_NULL, /* done */ ZERO_NULL, /* done */ ZERO_NULL, /* do_more */ ZERO_NULL, /* do_more */ ZERO_NULL, /* connect_it */ ZERO_NULL, /* connect_it */ Loading Loading @@ -142,7 +142,7 @@ static char *unescape_word(struct SessionHandle *data, const char *inp) return dictp; return dictp; } } static CURLcode Curl_dict(struct connectdata *conn, bool *done) static CURLcode dict_do(struct connectdata *conn, bool *done) { { char *word; char *word; char *eword; char *eword; Loading
lib/file.c +13 −13 Original line number Original line Diff line number Diff line Loading @@ -94,10 +94,10 @@ * Forward declarations. * Forward declarations. */ */ static CURLcode Curl_file(struct connectdata *, bool *done); static CURLcode file_do(struct connectdata *, bool *done); static CURLcode Curl_file_done(struct connectdata *conn, static CURLcode file_done(struct connectdata *conn, CURLcode status, bool premature); CURLcode status, bool premature); static CURLcode Curl_file_connect(struct connectdata *conn, bool *done); static CURLcode file_connect(struct connectdata *conn, bool *done); /* /* * FILE scheme handler. * FILE scheme handler. Loading @@ -106,10 +106,10 @@ static CURLcode Curl_file_connect(struct connectdata *conn, bool *done); const struct Curl_handler Curl_handler_file = { const struct Curl_handler Curl_handler_file = { "FILE", /* scheme */ "FILE", /* scheme */ ZERO_NULL, /* setup_connection */ ZERO_NULL, /* setup_connection */ Curl_file, /* do_it */ file_do, /* do_it */ Curl_file_done, /* done */ file_done, /* done */ ZERO_NULL, /* do_more */ ZERO_NULL, /* do_more */ Curl_file_connect, /* connect_it */ file_connect, /* connect_it */ ZERO_NULL, /* connecting */ ZERO_NULL, /* connecting */ ZERO_NULL, /* doing */ ZERO_NULL, /* doing */ ZERO_NULL, /* proto_getsock */ ZERO_NULL, /* proto_getsock */ Loading @@ -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 * do protocol-specific actions at connect-time. We emulate a * connect-then-transfer protocol and "connect" to the file here * 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; struct SessionHandle *data = conn->data; char *real_path = curl_easy_unescape(data, data->state.path, 0, NULL); char *real_path = curl_easy_unescape(data, data->state.path, 0, NULL); Loading Loading @@ -201,7 +201,7 @@ static CURLcode Curl_file_connect(struct connectdata *conn, bool *done) file->fd = fd; file->fd = fd; if(!data->set.upload && (fd == -1)) { if(!data->set.upload && (fd == -1)) { failf(data, "Couldn't open file %s", data->state.path); 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; return CURLE_FILE_COULDNT_READ_FILE; } } *done = TRUE; *done = TRUE; Loading @@ -209,7 +209,7 @@ static CURLcode Curl_file_connect(struct connectdata *conn, bool *done) return CURLE_OK; return CURLE_OK; } } static CURLcode Curl_file_done(struct connectdata *conn, static CURLcode file_done(struct connectdata *conn, CURLcode status, bool premature) CURLcode status, bool premature) { { struct FILEPROTO *file = conn->data->state.proto.file; struct FILEPROTO *file = conn->data->state.proto.file; Loading Loading @@ -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 * 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 * 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 * 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 * opposed to sockets) we instead perform the whole do-operation in this * function. * 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 /* This implementation ignores the host name in conformance with RFC 1738. Only local files (reachable via the standard file system) RFC 1738. Only local files (reachable via the standard file system) Loading
lib/ftp.c +55 −55 Original line number Original line Diff line number Diff line Loading @@ -134,21 +134,21 @@ static CURLcode ftp_nb_type(struct connectdata *conn, bool ascii, ftpstate newstate); bool ascii, ftpstate newstate); static int ftp_need_type(struct connectdata *conn, static int ftp_need_type(struct connectdata *conn, bool ascii); bool ascii); static CURLcode Curl_ftp(struct connectdata *conn, bool *done); static CURLcode ftp_do(struct connectdata *conn, bool *done); static CURLcode Curl_ftp_done(struct connectdata *conn, static CURLcode ftp_done(struct connectdata *conn, CURLcode, bool premature); CURLcode, bool premature); static CURLcode Curl_ftp_connect(struct connectdata *conn, bool *done); static CURLcode ftp_connect(struct connectdata *conn, bool *done); static CURLcode Curl_ftp_disconnect(struct connectdata *conn); static CURLcode ftp_disconnect(struct connectdata *conn); static CURLcode Curl_ftp_nextconnect(struct connectdata *conn); static CURLcode ftp_nextconnect(struct connectdata *conn); static CURLcode Curl_ftp_multi_statemach(struct connectdata *conn, bool *done); static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done); static int Curl_ftp_getsock(struct connectdata *conn, static int ftp_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks); int numsocks); static CURLcode Curl_ftp_doing(struct connectdata *conn, static CURLcode ftp_doing(struct connectdata *conn, bool *dophase_done); bool *dophase_done); static CURLcode Curl_ftp_setup_connection(struct connectdata * conn); static CURLcode ftp_setup_connection(struct connectdata * conn); #ifdef USE_SSL #ifdef USE_SSL static CURLcode Curl_ftps_setup_connection(struct connectdata * conn); static CURLcode ftps_setup_connection(struct connectdata * conn); #endif #endif /* easy-to-use macro: */ /* easy-to-use macro: */ Loading @@ -164,16 +164,16 @@ static CURLcode Curl_ftps_setup_connection(struct connectdata * conn); const struct Curl_handler Curl_handler_ftp = { const struct Curl_handler Curl_handler_ftp = { "FTP", /* scheme */ "FTP", /* scheme */ Curl_ftp_setup_connection, /* setup_connection */ ftp_setup_connection, /* setup_connection */ Curl_ftp, /* do_it */ ftp_do, /* do_it */ Curl_ftp_done, /* done */ ftp_done, /* done */ Curl_ftp_nextconnect, /* do_more */ ftp_nextconnect, /* do_more */ Curl_ftp_connect, /* connect_it */ ftp_connect, /* connect_it */ Curl_ftp_multi_statemach, /* connecting */ ftp_multi_statemach, /* connecting */ Curl_ftp_doing, /* doing */ ftp_doing, /* doing */ Curl_ftp_getsock, /* proto_getsock */ ftp_getsock, /* proto_getsock */ Curl_ftp_getsock, /* doing_getsock */ ftp_getsock, /* doing_getsock */ Curl_ftp_disconnect, /* disconnect */ ftp_disconnect, /* disconnect */ PORT_FTP, /* defport */ PORT_FTP, /* defport */ PROT_FTP /* protocol */ PROT_FTP /* protocol */ }; }; Loading @@ -186,16 +186,16 @@ const struct Curl_handler Curl_handler_ftp = { const struct Curl_handler Curl_handler_ftps = { const struct Curl_handler Curl_handler_ftps = { "FTPS", /* scheme */ "FTPS", /* scheme */ Curl_ftps_setup_connection, /* setup_connection */ ftps_setup_connection, /* setup_connection */ Curl_ftp, /* do_it */ ftp_do, /* do_it */ Curl_ftp_done, /* done */ ftp_done, /* done */ Curl_ftp_nextconnect, /* do_more */ ftp_nextconnect, /* do_more */ Curl_ftp_connect, /* connect_it */ ftp_connect, /* connect_it */ Curl_ftp_multi_statemach, /* connecting */ ftp_multi_statemach, /* connecting */ Curl_ftp_doing, /* doing */ ftp_doing, /* doing */ Curl_ftp_getsock, /* proto_getsock */ ftp_getsock, /* proto_getsock */ Curl_ftp_getsock, /* doing_getsock */ ftp_getsock, /* doing_getsock */ Curl_ftp_disconnect, /* disconnect */ ftp_disconnect, /* disconnect */ PORT_FTPS, /* defport */ PORT_FTPS, /* defport */ PROT_FTP | PROT_FTPS | PROT_SSL /* protocol */ PROT_FTP | PROT_FTPS | PROT_SSL /* protocol */ }; }; Loading Loading @@ -810,7 +810,7 @@ static CURLcode ftp_state_pwd(struct connectdata *conn) } } /* For the FTP "protocol connect" and "doing" phases only */ /* 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, curl_socket_t *socks, int numsocks) int numsocks) { { Loading Loading @@ -1589,7 +1589,7 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn, result=Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); result=Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); /* Set ->transfer so that we won't get any error in /* 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; ftp->transfer = FTPTRANSFER_NONE; state(conn, FTP_STOP); state(conn, FTP_STOP); Loading Loading @@ -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); result = Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); infof(data, "File already completely downloaded\n"); 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 */ * because we didn't transfer the any file */ ftp->transfer = FTPTRANSFER_NONE; ftp->transfer = FTPTRANSFER_NONE; state(conn, FTP_STOP); state(conn, FTP_STOP); Loading Loading @@ -2930,7 +2930,7 @@ static long ftp_state_timeout(struct connectdata *conn) /* called repeatedly until done from multi.c */ /* 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) bool *done) { { curl_socket_t sock = conn->sock[FIRSTSOCKET]; curl_socket_t sock = conn->sock[FIRSTSOCKET]; Loading Loading @@ -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 connection phase. * * * The variable 'done' points to will be TRUE if the protocol-layer connect * 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 * 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. * 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 */ bool *done) /* see description above */ { { CURLcode result; CURLcode result; Loading Loading @@ -3107,7 +3107,7 @@ static CURLcode Curl_ftp_connect(struct connectdata *conn, ftpc->response = Curl_tvnow(); /* start response time-out now! */ ftpc->response = Curl_tvnow(); /* start response time-out now! */ if(data->state.used_interface == Curl_if_multi) if(data->state.used_interface == Curl_if_multi) result = Curl_ftp_multi_statemach(conn, done); result = ftp_multi_statemach(conn, done); else { else { result = ftp_easy_statemach(conn); result = ftp_easy_statemach(conn); if(!result) if(!result) Loading @@ -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 * The DONE function. This does what needs to be done after a single DO has * performed. * performed. * * * Input argument is already checked for validity. * 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) bool premature) { { struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data; Loading Loading @@ -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 * This function shall be called when the second FTP (data) connection is * connected. * connected. */ */ static CURLcode Curl_ftp_nextconnect(struct connectdata *conn) static CURLcode ftp_nextconnect(struct connectdata *conn) { { struct SessionHandle *data=conn->data; struct SessionHandle *data=conn->data; struct ftp_conn *ftpc = &conn->proto.ftpc; struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result = CURLE_OK; 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; struct FTP *ftp = data->state.proto.ftp; DEBUGF(infof(data, "DO-MORE phase starts\n")); DEBUGF(infof(data, "DO-MORE phase starts\n")); Loading Loading @@ -3574,7 +3574,7 @@ CURLcode ftp_perform(struct connectdata *conn, /* run the state-machine */ /* run the state-machine */ if(conn->data->state.used_interface == Curl_if_multi) 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 { else { result = ftp_easy_statemach(conn); result = ftp_easy_statemach(conn); *dophase_done = TRUE; /* with the easy interface we are done here */ *dophase_done = TRUE; /* with the easy interface we are done here */ Loading @@ -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 * This function is registered as 'curl_do' function. It decodes the path * parts etc as a wrapper to the actual DO function (ftp_perform). * parts etc as a wrapper to the actual DO function (ftp_perform). * * * The input argument is already checked for validity. * 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; CURLcode retcode = CURLE_OK; Loading @@ -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 Since connections can be re-used between SessionHandles, this might be a connection already existing but on a fresh SessionHandle struct so we must 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, 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); Curl_reset_reqproto(conn); retcode = ftp_init(conn); retcode = ftp_init(conn); Loading Loading @@ -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 * Disconnect from an FTP server. Cleanup protocol-specific per-connection * resources. BLOCKING. * resources. BLOCKING. */ */ static CURLcode Curl_ftp_disconnect(struct connectdata *conn) static CURLcode ftp_disconnect(struct connectdata *conn) { { struct ftp_conn *ftpc= &conn->proto.ftpc; struct ftp_conn *ftpc= &conn->proto.ftpc; Loading Loading @@ -4024,7 +4024,7 @@ static CURLcode ftp_dophase_done(struct connectdata *conn, struct ftp_conn *ftpc = &conn->proto.ftpc; struct ftp_conn *ftpc = &conn->proto.ftpc; if(connected) if(connected) result = Curl_ftp_nextconnect(conn); result = ftp_nextconnect(conn); if(result && (conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD)) { if(result && (conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD)) { /* Failure detected, close the second socket if it was created already */ /* Failure detected, close the second socket if it was created already */ Loading @@ -4046,11 +4046,11 @@ static CURLcode ftp_dophase_done(struct connectdata *conn, } } /* called from multi.c while DOing */ /* called from multi.c while DOing */ static CURLcode Curl_ftp_doing(struct connectdata *conn, static CURLcode ftp_doing(struct connectdata *conn, bool *dophase_done) bool *dophase_done) { { CURLcode result; CURLcode result; result = Curl_ftp_multi_statemach(conn, dophase_done); result = ftp_multi_statemach(conn, dophase_done); if(*dophase_done) { if(*dophase_done) { result = ftp_dophase_done(conn, FALSE /* not connected */); result = ftp_dophase_done(conn, FALSE /* not connected */); Loading @@ -4070,7 +4070,7 @@ static CURLcode Curl_ftp_doing(struct connectdata *conn, * remote host. * remote host. * * * ftp->ctl_valid starts out as FALSE, and gets set to TRUE if we reach the * 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 static CURLcode ftp_regular_transfer(struct connectdata *conn, CURLcode ftp_regular_transfer(struct connectdata *conn, Loading Loading @@ -4109,7 +4109,7 @@ CURLcode ftp_regular_transfer(struct connectdata *conn, return result; return result; } } static CURLcode Curl_ftp_setup_connection(struct connectdata * conn) static CURLcode ftp_setup_connection(struct connectdata * conn) { { struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data; char * type; char * type; Loading Loading @@ -4170,12 +4170,12 @@ static CURLcode Curl_ftp_setup_connection(struct connectdata * conn) } } #ifdef USE_SSL #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; struct SessionHandle *data = conn->data; conn->ssl[SECONDARYSOCKET].use = data->set.ftp_ssl != CURLUSESSL_CONTROL; conn->ssl[SECONDARYSOCKET].use = data->set.ftp_ssl != CURLUSESSL_CONTROL; return Curl_ftp_setup_connection(conn); return ftp_setup_connection(conn); } } #endif #endif Loading
lib/http.c +22 −22 Original line number Original line Diff line number Diff line Loading @@ -109,9 +109,9 @@ * Forward declarations. * Forward declarations. */ */ static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done); static CURLcode https_connecting(struct connectdata *conn, bool *done); #ifdef USE_SSL #ifdef USE_SSL static int Curl_https_getsock(struct connectdata *conn, static int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks); int numsocks); #endif #endif Loading Loading @@ -146,9 +146,9 @@ const struct Curl_handler Curl_handler_https = { Curl_http_done, /* done */ Curl_http_done, /* done */ ZERO_NULL, /* do_more */ ZERO_NULL, /* do_more */ Curl_http_connect, /* connect_it */ Curl_http_connect, /* connect_it */ Curl_https_connecting, /* connecting */ https_connecting, /* connecting */ ZERO_NULL, /* doing */ ZERO_NULL, /* doing */ Curl_https_getsock, /* proto_getsock */ https_getsock, /* proto_getsock */ ZERO_NULL, /* doing_getsock */ ZERO_NULL, /* doing_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* disconnect */ PORT_HTTPS, /* defport */ PORT_HTTPS, /* defport */ Loading Loading @@ -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. * for HTTP Basic authentication. * * * Returns CURLcode. * Returns CURLcode. */ */ static CURLcode Curl_output_basic(struct connectdata *conn, bool proxy) static CURLcode http_output_basic(struct connectdata *conn, bool proxy) { { char *authorization; char *authorization; struct SessionHandle *data=conn->data; struct SessionHandle *data=conn->data; Loading Loading @@ -435,7 +435,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn) * @returns CURLcode * @returns CURLcode */ */ static CURLcode static CURLcode Curl_http_output_auth(struct connectdata *conn, http_output_auth(struct connectdata *conn, const char *request, const char *request, const char *path, const char *path, bool proxytunnel) /* TRUE if this is the request setting bool proxytunnel) /* TRUE if this is the request setting Loading Loading @@ -502,11 +502,11 @@ Curl_http_output_auth(struct connectdata *conn, if(conn->bits.proxy_user_passwd && if(conn->bits.proxy_user_passwd && !checkheaders(data, "Proxy-authorization:")) { !checkheaders(data, "Proxy-authorization:")) { auth="Basic"; auth="Basic"; result = Curl_output_basic(conn, TRUE); result = http_output_basic(conn, TRUE); if(result) if(result) return 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 */ functions work that way */ authproxy->done = TRUE; authproxy->done = TRUE; } } Loading Loading @@ -582,7 +582,7 @@ Curl_http_output_auth(struct connectdata *conn, if(conn->bits.user_passwd && if(conn->bits.user_passwd && !checkheaders(data, "Authorization:")) { !checkheaders(data, "Authorization:")) { auth="Basic"; auth="Basic"; result = Curl_output_basic(conn, FALSE); result = http_output_basic(conn, FALSE); if(result) if(result) return result; return result; } } Loading Loading @@ -1264,7 +1264,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, } } /* Setup the proxy-authorization header, if any */ /* 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) { if(CURLE_OK == result) { char *host=(char *)""; char *host=(char *)""; Loading Loading @@ -1682,7 +1682,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) if(conn->protocol & PROT_HTTPS) { if(conn->protocol & PROT_HTTPS) { /* perform SSL initialization */ /* perform SSL initialization */ if(data->state.used_interface == Curl_if_multi) { if(data->state.used_interface == Curl_if_multi) { result = Curl_https_connecting(conn, done); result = https_connecting(conn, done); if(result) if(result) return result; return result; } } Loading @@ -1701,7 +1701,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) return CURLE_OK; return CURLE_OK; } } static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done) static CURLcode https_connecting(struct connectdata *conn, bool *done) { { CURLcode result; CURLcode result; DEBUGASSERT((conn) && (conn->protocol & PROT_HTTPS)); DEBUGASSERT((conn) && (conn->protocol & PROT_HTTPS)); Loading @@ -1717,7 +1717,7 @@ static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done) #ifdef USE_SSLEAY #ifdef USE_SSLEAY /* This function is OpenSSL-specific. It should be made to query the generic /* This function is OpenSSL-specific. It should be made to query the generic SSL layer instead. */ SSL layer instead. */ static int Curl_https_getsock(struct connectdata *conn, static int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks) int numsocks) { { Loading @@ -1742,7 +1742,7 @@ static int Curl_https_getsock(struct connectdata *conn, } } #else #else #ifdef USE_GNUTLS #ifdef USE_GNUTLS int Curl_https_getsock(struct connectdata *conn, int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks) int numsocks) { { Loading @@ -1753,7 +1753,7 @@ int Curl_https_getsock(struct connectdata *conn, } } #else #else #ifdef USE_NSS #ifdef USE_NSS int Curl_https_getsock(struct connectdata *conn, int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks) int numsocks) { { Loading @@ -1764,7 +1764,7 @@ int Curl_https_getsock(struct connectdata *conn, } } #else #else #ifdef USE_QSOSSL #ifdef USE_QSOSSL int Curl_https_getsock(struct connectdata *conn, int https_getsock(struct connectdata *conn, curl_socket_t *socks, curl_socket_t *socks, int numsocks) int numsocks) { { Loading Loading @@ -1979,7 +1979,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) } } /* setup the authentication headers */ /* setup the authentication headers */ result = Curl_http_output_auth(conn, request, ppath, FALSE); result = http_output_auth(conn, request, ppath, FALSE); if(result) if(result) return result; return result; Loading
lib/parsedate.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -84,7 +84,7 @@ #include <curl/curl.h> #include <curl/curl.h> static time_t Curl_parsedate(const char *date); static time_t parsedate(const char *date); const char * const Curl_wkday[] = const char * const Curl_wkday[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; Loading Loading @@ -223,7 +223,7 @@ enum assume { DATE_TIME DATE_TIME }; }; static time_t Curl_parsedate(const char *date) static time_t parsedate(const char *date) { { time_t t = 0; time_t t = 0; int wdaynum=-1; /* day of the week number, 0-6 (mon-sun) */ int wdaynum=-1; /* day of the week number, 0-6 (mon-sun) */ Loading Loading @@ -421,5 +421,5 @@ static time_t Curl_parsedate(const char *date) time_t curl_getdate(const char *p, const time_t *now) time_t curl_getdate(const char *p, const time_t *now) { { (void)now; (void)now; return Curl_parsedate(p); return parsedate(p); } }