mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
Fix a couple of spelling errors in lib/
Found with codespell.
This commit is contained in:
parent
9230be0797
commit
1702a2c08d
@ -5,7 +5,7 @@
|
|||||||
#Description: makefile to be used in order to compile libcurl for VxWoorks 6.3.
|
#Description: makefile to be used in order to compile libcurl for VxWoorks 6.3.
|
||||||
#
|
#
|
||||||
#How to use:
|
#How to use:
|
||||||
# 1. Adjust environment variables at the file begining
|
# 1. Adjust environment variables at the file beginning
|
||||||
# 2. Open the Command Prompt window and change directory ('cd')
|
# 2. Open the Command Prompt window and change directory ('cd')
|
||||||
# into the 'lib' folder
|
# into the 'lib' folder
|
||||||
# 3. Add <CYGWIN>/bin folder to the PATH environment variable
|
# 3. Add <CYGWIN>/bin folder to the PATH environment variable
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
* Telnet option defines. Add more here if in need.
|
* Telnet option defines. Add more here if in need.
|
||||||
*/
|
*/
|
||||||
#define CURL_TELOPT_BINARY 0 /* binary 8bit data */
|
#define CURL_TELOPT_BINARY 0 /* binary 8bit data */
|
||||||
#define CURL_TELOPT_SGA 3 /* Supress Go Ahead */
|
#define CURL_TELOPT_SGA 3 /* Suppress Go Ahead */
|
||||||
#define CURL_TELOPT_EXOPL 255 /* EXtended OPtions List */
|
#define CURL_TELOPT_EXOPL 255 /* EXtended OPtions List */
|
||||||
#define CURL_TELOPT_TTYPE 24 /* Terminal TYPE */
|
#define CURL_TELOPT_TTYPE 24 /* Terminal TYPE */
|
||||||
#define CURL_TELOPT_XDISPLOC 35 /* X DISPlay LOCation */
|
#define CURL_TELOPT_XDISPLOC 35 /* X DISPlay LOCation */
|
||||||
|
@ -296,7 +296,7 @@ Curl_axtls_connect(struct connectdata *conn,
|
|||||||
else
|
else
|
||||||
infof(data, "\t server certificate verification SKIPPED\n");
|
infof(data, "\t server certificate verification SKIPPED\n");
|
||||||
|
|
||||||
/* Here, gtls.c does issuer verfication. axTLS has no straightforward
|
/* Here, gtls.c does issuer verification. axTLS has no straightforward
|
||||||
* equivalent, so omitting for now.*/
|
* equivalent, so omitting for now.*/
|
||||||
|
|
||||||
/* See if common name was set in server certificate */
|
/* See if common name was set in server certificate */
|
||||||
|
@ -174,7 +174,7 @@ long Curl_timeleft(struct SessionHandle *data,
|
|||||||
nowp = &now;
|
nowp = &now;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* substract elapsed time */
|
/* subtract elapsed time */
|
||||||
timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startsingle);
|
timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startsingle);
|
||||||
if(!timeout_ms)
|
if(!timeout_ms)
|
||||||
/* avoid returning 0 as that means no timeout! */
|
/* avoid returning 0 as that means no timeout! */
|
||||||
|
@ -266,7 +266,7 @@ Curl_cookie_add(struct SessionHandle *data,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(Curl_raw_equal("domain", name)) {
|
else if(Curl_raw_equal("domain", name)) {
|
||||||
/* note that this name may or may not have a preceeding dot, but
|
/* note that this name may or may not have a preceding dot, but
|
||||||
we don't care about that, we treat the names the same anyway */
|
we don't care about that, we treat the names the same anyway */
|
||||||
|
|
||||||
const char *domptr=whatptr;
|
const char *domptr=whatptr;
|
||||||
@ -307,7 +307,7 @@ Curl_cookie_add(struct SessionHandle *data,
|
|||||||
or the given domain is not valid and thus cannot be set. */
|
or the given domain is not valid and thus cannot be set. */
|
||||||
|
|
||||||
if('.' == whatptr[0])
|
if('.' == whatptr[0])
|
||||||
whatptr++; /* ignore preceeding dot */
|
whatptr++; /* ignore preceding dot */
|
||||||
|
|
||||||
if(!domain || tailmatch(whatptr, domain)) {
|
if(!domain || tailmatch(whatptr, domain)) {
|
||||||
const char *tailptr=whatptr;
|
const char *tailptr=whatptr;
|
||||||
@ -479,7 +479,7 @@ Curl_cookie_add(struct SessionHandle *data,
|
|||||||
marked with httpOnly after the domain name are not accessible
|
marked with httpOnly after the domain name are not accessible
|
||||||
from javascripts, but since curl does not operate at javascript
|
from javascripts, but since curl does not operate at javascript
|
||||||
level, we include them anyway. In Firefox's cookie files, these
|
level, we include them anyway. In Firefox's cookie files, these
|
||||||
lines are preceeded with #HttpOnly_ and then everything is
|
lines are preceded with #HttpOnly_ and then everything is
|
||||||
as usual, so we skip 10 characters of the line..
|
as usual, so we skip 10 characters of the line..
|
||||||
*/
|
*/
|
||||||
if (strncmp(lineptr, "#HttpOnly_", 10) == 0) {
|
if (strncmp(lineptr, "#HttpOnly_", 10) == 0) {
|
||||||
@ -514,7 +514,7 @@ Curl_cookie_add(struct SessionHandle *data,
|
|||||||
ptr=strtok_r(NULL, "\t", &tok_buf), fields++) {
|
ptr=strtok_r(NULL, "\t", &tok_buf), fields++) {
|
||||||
switch(fields) {
|
switch(fields) {
|
||||||
case 0:
|
case 0:
|
||||||
if(ptr[0]=='.') /* skip preceeding dots */
|
if(ptr[0]=='.') /* skip preceding dots */
|
||||||
ptr++;
|
ptr++;
|
||||||
co->domain = strdup(ptr);
|
co->domain = strdup(ptr);
|
||||||
if(!co->domain)
|
if(!co->domain)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When including the folowing three headers, it is mandatory to define either
|
* When including the following three headers, it is mandatory to define either
|
||||||
* SECURITY_WIN32 or SECURITY_KERNEL, indicating who is compiling the code.
|
* SECURITY_WIN32 or SECURITY_KERNEL, indicating who is compiling the code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
12
lib/ftp.c
12
lib/ftp.c
@ -2162,7 +2162,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
|
|||||||
/*
|
/*
|
||||||
A;
|
A;
|
||||||
150 Opening BINARY mode data connection for /etc/passwd (2241
|
150 Opening BINARY mode data connection for /etc/passwd (2241
|
||||||
bytes). (ok, the file is being transfered)
|
bytes). (ok, the file is being transferred)
|
||||||
|
|
||||||
B:
|
B:
|
||||||
150 Opening ASCII mode data connection for /bin/ls
|
150 Opening ASCII mode data connection for /bin/ls
|
||||||
@ -2194,7 +2194,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
|
|||||||
/*
|
/*
|
||||||
* It seems directory listings either don't show the size or very
|
* It seems directory listings either don't show the size or very
|
||||||
* often uses size 0 anyway. ASCII transfers may very well turn out
|
* often uses size 0 anyway. ASCII transfers may very well turn out
|
||||||
* that the transfered amount of data is not the same as this line
|
* that the transferred amount of data is not the same as this line
|
||||||
* tells, why using this number in those cases only confuses us.
|
* tells, why using this number in those cases only confuses us.
|
||||||
*
|
*
|
||||||
* Example D above makes this parsing a little tricky */
|
* Example D above makes this parsing a little tricky */
|
||||||
@ -2692,7 +2692,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
|||||||
case FTP_RETR_PREQUOTE:
|
case FTP_RETR_PREQUOTE:
|
||||||
case FTP_STOR_PREQUOTE:
|
case FTP_STOR_PREQUOTE:
|
||||||
if((ftpcode >= 400) && !ftpc->count2) {
|
if((ftpcode >= 400) && !ftpc->count2) {
|
||||||
/* failure reponse code, and not allowed to fail */
|
/* failure response code, and not allowed to fail */
|
||||||
failf(conn->data, "QUOT command failed with %03d", ftpcode);
|
failf(conn->data, "QUOT command failed with %03d", ftpcode);
|
||||||
return CURLE_QUOTE_ERROR;
|
return CURLE_QUOTE_ERROR;
|
||||||
}
|
}
|
||||||
@ -2913,7 +2913,7 @@ static CURLcode ftp_connect(struct connectdata *conn,
|
|||||||
if(CURLE_OK != result)
|
if(CURLE_OK != result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
/* We always support persistant connections on ftp */
|
/* We always support persistent connections on ftp */
|
||||||
conn->bits.close = FALSE;
|
conn->bits.close = FALSE;
|
||||||
|
|
||||||
pp->response_time = RESP_TIMEOUT; /* set default response time-out */
|
pp->response_time = RESP_TIMEOUT; /* set default response time-out */
|
||||||
@ -3109,7 +3109,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
|
|||||||
/*
|
/*
|
||||||
* Let's see what the server says about the transfer we just performed,
|
* Let's see what the server says about the transfer we just performed,
|
||||||
* but lower the timeout as sometimes this connection has died while the
|
* but lower the timeout as sometimes this connection has died while the
|
||||||
* data has been transfered. This happens when doing through NATs etc that
|
* data has been transferred. This happens when doing through NATs etc that
|
||||||
* abandon old silent connections.
|
* abandon old silent connections.
|
||||||
*/
|
*/
|
||||||
long old_time = pp->response_time;
|
long old_time = pp->response_time;
|
||||||
@ -3981,7 +3981,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
|
|||||||
/* seek out the next path component */
|
/* seek out the next path component */
|
||||||
if(slash_pos-cur_pos) {
|
if(slash_pos-cur_pos) {
|
||||||
/* we skip empty path components, like "x//y" since the FTP command
|
/* we skip empty path components, like "x//y" since the FTP command
|
||||||
CWD requires a parameter and a non-existant parameter a) doesn't
|
CWD requires a parameter and a non-existent parameter a) doesn't
|
||||||
work on many servers and b) has no effect on the others. */
|
work on many servers and b) has no effect on the others. */
|
||||||
int len = (int)(slash_pos - cur_pos + absolute_dir);
|
int len = (int)(slash_pos - cur_pos + absolute_dir);
|
||||||
ftpc->dirs[ftpc->dirdepth] =
|
ftpc->dirs[ftpc->dirdepth] =
|
||||||
|
@ -260,7 +260,7 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
|
|||||||
*param_slistp = ptr.to_slist;
|
*param_slistp = ptr.to_slist;
|
||||||
break;
|
break;
|
||||||
case CURLINFO_CONDITION_UNMET:
|
case CURLINFO_CONDITION_UNMET:
|
||||||
/* return if the condition prevented the document to get transfered */
|
/* return if the condition prevented the document to get transferred */
|
||||||
*param_longp = data->info.timecond;
|
*param_longp = data->info.timecond;
|
||||||
break;
|
break;
|
||||||
case CURLINFO_RTSP_SESSION_ID:
|
case CURLINFO_RTSP_SESSION_ID:
|
||||||
|
@ -186,7 +186,7 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const char * hostname, int port);
|
|||||||
* Curl_addrinfo_callback() is used when we build with any asynch specialty.
|
* Curl_addrinfo_callback() is used when we build with any asynch specialty.
|
||||||
* Handles end of async request processing. Inserts ai into hostcache when
|
* Handles end of async request processing. Inserts ai into hostcache when
|
||||||
* status is CURL_ASYNC_SUCCESS. Twiddles fields in conn to indicate async
|
* status is CURL_ASYNC_SUCCESS. Twiddles fields in conn to indicate async
|
||||||
* request completed wether successfull or failed.
|
* request completed wether successful or failed.
|
||||||
*/
|
*/
|
||||||
CURLcode Curl_addrinfo_callback(struct connectdata *conn,
|
CURLcode Curl_addrinfo_callback(struct connectdata *conn,
|
||||||
int status,
|
int status,
|
||||||
|
@ -167,7 +167,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(neg_ctx->context && neg_ctx->status == GSS_S_COMPLETE) {
|
if(neg_ctx->context && neg_ctx->status == GSS_S_COMPLETE) {
|
||||||
/* We finished succesfully our part of authentication, but server
|
/* We finished successfully our part of authentication, but server
|
||||||
* rejected it (since we're again here). Exit with an error since we
|
* rejected it (since we're again here). Exit with an error since we
|
||||||
* can't invent anything better */
|
* can't invent anything better */
|
||||||
Curl_cleanup_negotiate(conn->data);
|
Curl_cleanup_negotiate(conn->data);
|
||||||
|
@ -122,7 +122,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(neg_ctx->context && neg_ctx->status == SEC_E_OK) {
|
if(neg_ctx->context && neg_ctx->status == SEC_E_OK) {
|
||||||
/* We finished succesfully our part of authentication, but server
|
/* We finished successfully our part of authentication, but server
|
||||||
* rejected it (since we're again here). Exit with an error since we
|
* rejected it (since we're again here). Exit with an error since we
|
||||||
* can't invent anything better */
|
* can't invent anything better */
|
||||||
Curl_cleanup_negotiate(conn->data);
|
Curl_cleanup_negotiate(conn->data);
|
||||||
@ -165,7 +165,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !input_token ) {
|
if ( !input_token ) {
|
||||||
/* first call in a new negotation, we have to require credentials,
|
/* first call in a new negotiation, we have to require credentials,
|
||||||
and allocate memory for the context */
|
and allocate memory for the context */
|
||||||
|
|
||||||
neg_ctx->credentials = (CredHandle *)malloc(sizeof(CredHandle));
|
neg_ctx->credentials = (CredHandle *)malloc(sizeof(CredHandle));
|
||||||
|
@ -470,7 +470,7 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn,
|
|||||||
infof(data, "Filesize left: %" FORMAT_OFF_T "\n", filesize);
|
infof(data, "Filesize left: %" FORMAT_OFF_T "\n", filesize);
|
||||||
|
|
||||||
if(!filesize)
|
if(!filesize)
|
||||||
/* the entire data is already transfered! */
|
/* the entire data is already transferred! */
|
||||||
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
|
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
|
||||||
else
|
else
|
||||||
/* IMAP download */
|
/* IMAP download */
|
||||||
@ -709,7 +709,7 @@ static CURLcode imap_connect(struct connectdata *conn,
|
|||||||
if(CURLE_OK != result)
|
if(CURLE_OK != result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
/* We always support persistant connections on imap */
|
/* We always support persistent connections on imap */
|
||||||
conn->bits.close = FALSE;
|
conn->bits.close = FALSE;
|
||||||
|
|
||||||
pp->response_time = RESP_TIMEOUT; /* set default response time-out */
|
pp->response_time = RESP_TIMEOUT; /* set default response time-out */
|
||||||
|
@ -195,9 +195,9 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
|
|||||||
* error, EAFNOSUPPORT or ENOSPC.
|
* error, EAFNOSUPPORT or ENOSPC.
|
||||||
*
|
*
|
||||||
* On Windows we store the error in the thread errno, not
|
* On Windows we store the error in the thread errno, not
|
||||||
* in the winsock error code. This is to avoid loosing the
|
* in the winsock error code. This is to avoid losing the
|
||||||
* actual last winsock error. So use macro ERRNO to fetch the
|
* actual last winsock error. So use macro ERRNO to fetch the
|
||||||
* errno this funtion sets when returning NULL, not SOCKERRNO.
|
* errno this function sets when returning NULL, not SOCKERRNO.
|
||||||
*/
|
*/
|
||||||
char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size)
|
char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size)
|
||||||
{
|
{
|
||||||
|
@ -61,9 +61,9 @@ static int inet_pton6(const char *src, unsigned char *dst);
|
|||||||
* -1 if some other error occurred (`dst' is untouched in this case, too)
|
* -1 if some other error occurred (`dst' is untouched in this case, too)
|
||||||
* notice:
|
* notice:
|
||||||
* On Windows we store the error in the thread errno, not
|
* On Windows we store the error in the thread errno, not
|
||||||
* in the winsock error code. This is to avoid loosing the
|
* in the winsock error code. This is to avoid losing the
|
||||||
* actual last winsock error. So use macro ERRNO to fetch the
|
* actual last winsock error. So use macro ERRNO to fetch the
|
||||||
* errno this funtion sets when returning (-1), not SOCKERRNO.
|
* errno this function sets when returning (-1), not SOCKERRNO.
|
||||||
* author:
|
* author:
|
||||||
* Paul Vixie, 1996.
|
* Paul Vixie, 1996.
|
||||||
*/
|
*/
|
||||||
|
@ -218,7 +218,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
|
|||||||
if(ldap_ssl) {
|
if(ldap_ssl) {
|
||||||
#ifdef HAVE_LDAP_SSL
|
#ifdef HAVE_LDAP_SSL
|
||||||
#ifdef CURL_LDAP_WIN
|
#ifdef CURL_LDAP_WIN
|
||||||
/* Win32 LDAP SDK doesnt support insecure mode without CA! */
|
/* Win32 LDAP SDK doesn't support insecure mode without CA! */
|
||||||
server = ldap_sslinit(conn->host.name, (int)conn->port, 1);
|
server = ldap_sslinit(conn->host.name, (int)conn->port, 1);
|
||||||
ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON);
|
ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON);
|
||||||
#else
|
#else
|
||||||
|
@ -124,7 +124,7 @@ typedef enum {
|
|||||||
FORMAT_WIDTH /* For internal use */
|
FORMAT_WIDTH /* For internal use */
|
||||||
} FormatType;
|
} FormatType;
|
||||||
|
|
||||||
/* convertion and display flags */
|
/* conversion and display flags */
|
||||||
enum {
|
enum {
|
||||||
FLAGS_NEW = 0,
|
FLAGS_NEW = 0,
|
||||||
FLAGS_SPACE = 1<<0,
|
FLAGS_SPACE = 1<<0,
|
||||||
@ -692,7 +692,7 @@ static int dprintf_formatf(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If this is a positional parameter, the position must follow imediately
|
/* If this is a positional parameter, the position must follow immediately
|
||||||
after the %, thus create a %<num>$ sequence */
|
after the %, thus create a %<num>$ sequence */
|
||||||
param=dprintf_DollarString(f, &f);
|
param=dprintf_DollarString(f, &f);
|
||||||
|
|
||||||
|
@ -645,7 +645,7 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
|||||||
easy->state > CURLM_STATE_WAITDO &&
|
easy->state > CURLM_STATE_WAITDO &&
|
||||||
easy->state < CURLM_STATE_COMPLETED) {
|
easy->state < CURLM_STATE_COMPLETED) {
|
||||||
/* If the handle is in a pipeline and has started sending off its
|
/* If the handle is in a pipeline and has started sending off its
|
||||||
request but not received its reponse yet, we need to close
|
request but not received its response yet, we need to close
|
||||||
connection. */
|
connection. */
|
||||||
easy->easy_conn->bits.close = TRUE;
|
easy->easy_conn->bits.close = TRUE;
|
||||||
/* Set connection owner so that Curl_done() closes it.
|
/* Set connection owner so that Curl_done() closes it.
|
||||||
@ -1495,7 +1495,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||||||
/* call this even if the readwrite function returned error */
|
/* call this even if the readwrite function returned error */
|
||||||
Curl_posttransfer(data);
|
Curl_posttransfer(data);
|
||||||
|
|
||||||
/* we're no longer receving */
|
/* we're no longer receiving */
|
||||||
moveHandleFromRecvToDonePipeline(data,
|
moveHandleFromRecvToDonePipeline(data,
|
||||||
easy->easy_conn);
|
easy->easy_conn);
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ int Curl_parsedate(const char *date, time_t *output)
|
|||||||
(indate< date) &&
|
(indate< date) &&
|
||||||
((date[-1] == '+' || date[-1] == '-'))) {
|
((date[-1] == '+' || date[-1] == '-'))) {
|
||||||
/* four digits and a value less than or equal to 1400 (to take into
|
/* four digits and a value less than or equal to 1400 (to take into
|
||||||
account all sorts of funny time zone diffs) and it is preceeded
|
account all sorts of funny time zone diffs) and it is preceded
|
||||||
with a plus or minus. This is a time zone indication. 1400 is
|
with a plus or minus. This is a time zone indication. 1400 is
|
||||||
picked since +1300 is frequently used and +1400 is mentioned as
|
picked since +1300 is frequently used and +1400 is mentioned as
|
||||||
an edge number in the document "ISO C 200X Proposal: Timezone
|
an edge number in the document "ISO C 200X Proposal: Timezone
|
||||||
|
@ -641,7 +641,7 @@ static CURLcode pop3_connect(struct connectdata *conn,
|
|||||||
if(CURLE_OK != result)
|
if(CURLE_OK != result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
/* We always support persistant connections on pop3 */
|
/* We always support persistent connections on pop3 */
|
||||||
conn->bits.close = FALSE;
|
conn->bits.close = FALSE;
|
||||||
|
|
||||||
pp->response_time = RESP_TIMEOUT; /* set default response time-out */
|
pp->response_time = RESP_TIMEOUT; /* set default response time-out */
|
||||||
|
@ -409,17 +409,17 @@ int Curl_pgrsUpdate(struct connectdata *conn)
|
|||||||
time2str(time_total, total_estimate);
|
time2str(time_total, total_estimate);
|
||||||
time2str(time_spent, timespent);
|
time2str(time_spent, timespent);
|
||||||
|
|
||||||
/* Get the total amount of data expected to get transfered */
|
/* Get the total amount of data expected to get transferred */
|
||||||
total_expected_transfer =
|
total_expected_transfer =
|
||||||
(data->progress.flags & PGRS_UL_SIZE_KNOWN?
|
(data->progress.flags & PGRS_UL_SIZE_KNOWN?
|
||||||
data->progress.size_ul:data->progress.uploaded)+
|
data->progress.size_ul:data->progress.uploaded)+
|
||||||
(data->progress.flags & PGRS_DL_SIZE_KNOWN?
|
(data->progress.flags & PGRS_DL_SIZE_KNOWN?
|
||||||
data->progress.size_dl:data->progress.downloaded);
|
data->progress.size_dl:data->progress.downloaded);
|
||||||
|
|
||||||
/* We have transfered this much so far */
|
/* We have transferred this much so far */
|
||||||
total_transfer = data->progress.downloaded + data->progress.uploaded;
|
total_transfer = data->progress.downloaded + data->progress.uploaded;
|
||||||
|
|
||||||
/* Get the percentage of data transfered so far */
|
/* Get the percentage of data transferred so far */
|
||||||
if(total_expected_transfer > CURL_OFF_T_C(10000))
|
if(total_expected_transfer > CURL_OFF_T_C(10000))
|
||||||
total_percen = total_transfer /
|
total_percen = total_transfer /
|
||||||
(total_expected_transfer/CURL_OFF_T_C(100));
|
(total_expected_transfer/CURL_OFF_T_C(100));
|
||||||
|
@ -395,7 +395,7 @@ static ssize_t qsossl_send(struct connectdata * conn, int sockindex,
|
|||||||
|
|
||||||
case SSL_ERROR_BAD_STATE:
|
case SSL_ERROR_BAD_STATE:
|
||||||
/* The operation did not complete; the same SSL I/O function
|
/* The operation did not complete; the same SSL I/O function
|
||||||
should be called again later. This is basicly an EWOULDBLOCK
|
should be called again later. This is basically an EWOULDBLOCK
|
||||||
equivalent. */
|
equivalent. */
|
||||||
*curlcode = CURLE_AGAIN;
|
*curlcode = CURLE_AGAIN;
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -147,7 +147,7 @@ static int ftp_send_command(struct connectdata *conn, const char *message, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Read |len| from the socket |fd| and store it in |to|. Return a CURLcode
|
/* Read |len| from the socket |fd| and store it in |to|. Return a CURLcode
|
||||||
saying whether an error occured or CURLE_OK if |len| was read. */
|
saying whether an error occurred or CURLE_OK if |len| was read. */
|
||||||
static CURLcode
|
static CURLcode
|
||||||
socket_read(curl_socket_t fd, void *to, size_t len)
|
socket_read(curl_socket_t fd, void *to, size_t len)
|
||||||
{
|
{
|
||||||
@ -173,7 +173,7 @@ socket_read(curl_socket_t fd, void *to, size_t len)
|
|||||||
|
|
||||||
|
|
||||||
/* Write |len| bytes from the buffer |to| to the socket |fd|. Return a
|
/* Write |len| bytes from the buffer |to| to the socket |fd|. Return a
|
||||||
CURLcode saying whether an error occured or CURLE_OK if |len| was
|
CURLcode saying whether an error occurred or CURLE_OK if |len| was
|
||||||
written. */
|
written. */
|
||||||
static CURLcode
|
static CURLcode
|
||||||
socket_write(struct connectdata *conn, curl_socket_t fd, const void *to,
|
socket_write(struct connectdata *conn, curl_socket_t fd, const void *to,
|
||||||
|
@ -621,7 +621,7 @@ static int showit(struct SessionHandle *data, curl_infotype type,
|
|||||||
size_t i;
|
size_t i;
|
||||||
for(i = 0; i < size-4; i++) {
|
for(i = 0; i < size-4; i++) {
|
||||||
if(memcmp(&buf[i], "\x0d\x0a\x0d\x0a", 4) == 0) {
|
if(memcmp(&buf[i], "\x0d\x0a\x0d\x0a", 4) == 0) {
|
||||||
/* convert everthing through this CRLFCRLF but no further */
|
/* convert everything through this CRLFCRLF but no further */
|
||||||
conv_size = i + 4;
|
conv_size = i + 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1108,7 +1108,7 @@ static CURLcode smtp_connect(struct connectdata *conn,
|
|||||||
if(CURLE_OK != result)
|
if(CURLE_OK != result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
/* We always support persistant connections on smtp */
|
/* We always support persistent connections on smtp */
|
||||||
conn->bits.close = FALSE;
|
conn->bits.close = FALSE;
|
||||||
|
|
||||||
pp->response_time = RESP_TIMEOUT; /* set default response time-out */
|
pp->response_time = RESP_TIMEOUT; /* set default response time-out */
|
||||||
|
@ -422,7 +422,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(result & CURL_CSELECT_ERR) {
|
if(result & CURL_CSELECT_ERR) {
|
||||||
failf(conn->data, "SOCKS5: error occured during connection");
|
failf(conn->data, "SOCKS5: error occurred during connection");
|
||||||
return CURLE_COULDNT_CONNECT;
|
return CURLE_COULDNT_CONNECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -461,7 +461,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(result & CURL_CSELECT_ERR) {
|
if(result & CURL_CSELECT_ERR) {
|
||||||
failf(conn->data, "SOCKS5 read error occured");
|
failf(conn->data, "SOCKS5 read error occurred");
|
||||||
return CURLE_RECV_ERROR;
|
return CURLE_RECV_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ CURLcode Curl_speedcheck(struct SessionHandle *data,
|
|||||||
/* we have been this slow for long enough, now die */
|
/* we have been this slow for long enough, now die */
|
||||||
failf(data,
|
failf(data,
|
||||||
"Operation too slow. "
|
"Operation too slow. "
|
||||||
"Less than %ld bytes/sec transfered the last %ld seconds",
|
"Less than %ld bytes/sec transferred the last %ld seconds",
|
||||||
data->set.low_speed_limit,
|
data->set.low_speed_limit,
|
||||||
data->set.low_speed_time);
|
data->set.low_speed_time);
|
||||||
return CURLE_OPERATION_TIMEDOUT;
|
return CURLE_OPERATION_TIMEDOUT;
|
||||||
|
@ -1200,7 +1200,7 @@ static CURLcode verifyhost(struct connectdata *conn,
|
|||||||
res = CURLE_PEER_FAILED_VERIFICATION;
|
res = CURLE_PEER_FAILED_VERIFICATION;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* we have to look to the last occurence of a commonName in the
|
/* we have to look to the last occurrence of a commonName in the
|
||||||
distinguished one to get the most significant one. */
|
distinguished one to get the most significant one. */
|
||||||
int j,i=-1 ;
|
int j,i=-1 ;
|
||||||
|
|
||||||
@ -2587,7 +2587,7 @@ static ssize_t ossl_send(struct connectdata *conn,
|
|||||||
case SSL_ERROR_WANT_READ:
|
case SSL_ERROR_WANT_READ:
|
||||||
case SSL_ERROR_WANT_WRITE:
|
case SSL_ERROR_WANT_WRITE:
|
||||||
/* The operation did not complete; the same TLS/SSL I/O function
|
/* The operation did not complete; the same TLS/SSL I/O function
|
||||||
should be called again later. This is basicly an EWOULDBLOCK
|
should be called again later. This is basically an EWOULDBLOCK
|
||||||
equivalent. */
|
equivalent. */
|
||||||
*curlcode = CURLE_AGAIN;
|
*curlcode = CURLE_AGAIN;
|
||||||
return -1;
|
return -1;
|
||||||
@ -2658,7 +2658,7 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
|
|||||||
size_t Curl_ossl_version(char *buffer, size_t size)
|
size_t Curl_ossl_version(char *buffer, size_t size)
|
||||||
{
|
{
|
||||||
#ifdef YASSL_VERSION
|
#ifdef YASSL_VERSION
|
||||||
/* yassl provides an OpenSSL API compatiblity layer so it looks identical
|
/* yassl provides an OpenSSL API compatibility layer so it looks identical
|
||||||
to OpenSSL in all other aspects */
|
to OpenSSL in all other aspects */
|
||||||
return snprintf(buffer, size, "yassl/%s", YASSL_VERSION);
|
return snprintf(buffer, size, "yassl/%s", YASSL_VERSION);
|
||||||
#else /* YASSL_VERSION */
|
#else /* YASSL_VERSION */
|
||||||
|
@ -1093,7 +1093,7 @@ CURLcode telrcv(struct connectdata *conn,
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This is an error. We only expect to get "IAC IAC" or "IAC SE".
|
* This is an error. We only expect to get "IAC IAC" or "IAC SE".
|
||||||
* Several things may have happend. An IAC was not doubled, the
|
* Several things may have happened. An IAC was not doubled, the
|
||||||
* IAC SE was left off, or another option got inserted into the
|
* IAC SE was left off, or another option got inserted into the
|
||||||
* suboption are all possibilities. If we assume that the IAC was
|
* suboption are all possibilities. If we assume that the IAC was
|
||||||
* not doubled, and really the IAC SE was left off, we could get
|
* not doubled, and really the IAC SE was left off, we could get
|
||||||
|
@ -1276,7 +1276,7 @@ static CURLcode tftp_easy_statemach(struct connectdata *conn)
|
|||||||
else {
|
else {
|
||||||
|
|
||||||
if(rc==0) {
|
if(rc==0) {
|
||||||
/* A timeout occured, but our timeout is variable, so maybe
|
/* A timeout occurred, but our timeout is variable, so maybe
|
||||||
just continue? */
|
just continue? */
|
||||||
long rtms = state->retry_time * 1000;
|
long rtms = state->retry_time * 1000;
|
||||||
if (Curl_tvdiff(k->now, transaction_start) > rtms) {
|
if (Curl_tvdiff(k->now, transaction_start) > rtms) {
|
||||||
|
@ -233,7 +233,7 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
|
|||||||
#endif /* CURL_DOES_CONVERSIONS */
|
#endif /* CURL_DOES_CONVERSIONS */
|
||||||
|
|
||||||
if((nread - hexlen) == 0)
|
if((nread - hexlen) == 0)
|
||||||
/* mark this as done once this chunk is transfered */
|
/* mark this as done once this chunk is transferred */
|
||||||
data->req.upload_done = TRUE;
|
data->req.upload_done = TRUE;
|
||||||
|
|
||||||
nread+=(int)strlen(endofline_native); /* for the added end of line */
|
nread+=(int)strlen(endofline_native); /* for the added end of line */
|
||||||
@ -2098,7 +2098,7 @@ CURLcode Curl_retry_request(struct connectdata *conn,
|
|||||||
to retry. Marking it this way should
|
to retry. Marking it this way should
|
||||||
prevent i.e HTTP transfers to return
|
prevent i.e HTTP transfers to return
|
||||||
error just because nothing has been
|
error just because nothing has been
|
||||||
transfered! */
|
transferred! */
|
||||||
|
|
||||||
if(data->state.proto.http->writebytecount)
|
if(data->state.proto.http->writebytecount)
|
||||||
Curl_readrewind(conn);
|
Curl_readrewind(conn);
|
||||||
|
@ -551,7 +551,7 @@ struct SingleRequest {
|
|||||||
|
|
||||||
long headerbytecount; /* only count received headers */
|
long headerbytecount; /* only count received headers */
|
||||||
long deductheadercount; /* this amount of bytes doesn't count when we check
|
long deductheadercount; /* this amount of bytes doesn't count when we check
|
||||||
if anything has been transfered at the end of a
|
if anything has been transferred at the end of a
|
||||||
connection. We use this counter to make only a
|
connection. We use this counter to make only a
|
||||||
100 reply (without a following second response
|
100 reply (without a following second response
|
||||||
code) result in a CURLE_GOT_NOTHING error code */
|
code) result in a CURLE_GOT_NOTHING error code */
|
||||||
@ -778,9 +778,9 @@ struct connectdata {
|
|||||||
|
|
||||||
/* 'primary_ip' and 'primary_port' get filled with peer's numerical
|
/* 'primary_ip' and 'primary_port' get filled with peer's numerical
|
||||||
ip address and port number whenever an outgoing connection is
|
ip address and port number whenever an outgoing connection is
|
||||||
*attemted* from the primary socket to a remote address. When more
|
*attempted* from the primary socket to a remote address. When more
|
||||||
than one address is tried for a connection these will hold data
|
than one address is tried for a connection these will hold data
|
||||||
for the last attempt. When the connection is actualy established
|
for the last attempt. When the connection is actually established
|
||||||
these are updated with data which comes directly from the socket. */
|
these are updated with data which comes directly from the socket. */
|
||||||
|
|
||||||
char primary_ip[MAX_IPADR_LEN];
|
char primary_ip[MAX_IPADR_LEN];
|
||||||
@ -997,8 +997,8 @@ struct Progress {
|
|||||||
force redraw at next call */
|
force redraw at next call */
|
||||||
curl_off_t size_dl; /* total expected size */
|
curl_off_t size_dl; /* total expected size */
|
||||||
curl_off_t size_ul; /* total expected size */
|
curl_off_t size_ul; /* total expected size */
|
||||||
curl_off_t downloaded; /* transfered so far */
|
curl_off_t downloaded; /* transferred so far */
|
||||||
curl_off_t uploaded; /* transfered so far */
|
curl_off_t uploaded; /* transferred so far */
|
||||||
|
|
||||||
curl_off_t current_speed; /* uses the currently fastest transfer */
|
curl_off_t current_speed; /* uses the currently fastest transfer */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user