mirror of
https://github.com/curl/curl.git
synced 2025-01-24 14:15:18 +08:00
urldata: remove now
from struct SingleRequest - not needed
Closes #10549
This commit is contained in:
parent
b30b0c3840
commit
e187d69e48
@ -1055,6 +1055,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||
{
|
||||
struct SingleRequest *k = &data->req;
|
||||
CURLcode result;
|
||||
struct curltime now;
|
||||
int didwhat = 0;
|
||||
|
||||
curl_socket_t fd_read;
|
||||
@ -1124,7 +1125,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||
}
|
||||
#endif
|
||||
|
||||
k->now = Curl_now();
|
||||
now = Curl_now();
|
||||
if(!didwhat) {
|
||||
/* no read no write, this is a timeout? */
|
||||
if(k->exp100 == EXP100_AWAITING_CONTINUE) {
|
||||
@ -1141,7 +1142,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||
|
||||
*/
|
||||
|
||||
timediff_t ms = Curl_timediff(k->now, k->start100);
|
||||
timediff_t ms = Curl_timediff(now, k->start100);
|
||||
if(ms >= data->set.expect_100_timeout) {
|
||||
/* we've waited long enough, continue anyway */
|
||||
k->exp100 = EXP100_SEND_DATA;
|
||||
@ -1159,23 +1160,23 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||
if(Curl_pgrsUpdate(data))
|
||||
result = CURLE_ABORTED_BY_CALLBACK;
|
||||
else
|
||||
result = Curl_speedcheck(data, k->now);
|
||||
result = Curl_speedcheck(data, now);
|
||||
if(result)
|
||||
goto out;
|
||||
|
||||
if(k->keepon) {
|
||||
if(0 > Curl_timeleft(data, &k->now, FALSE)) {
|
||||
if(0 > Curl_timeleft(data, &now, FALSE)) {
|
||||
if(k->size != -1) {
|
||||
failf(data, "Operation timed out after %" CURL_FORMAT_TIMEDIFF_T
|
||||
" milliseconds with %" CURL_FORMAT_CURL_OFF_T " out of %"
|
||||
CURL_FORMAT_CURL_OFF_T " bytes received",
|
||||
Curl_timediff(k->now, data->progress.t_startsingle),
|
||||
Curl_timediff(now, data->progress.t_startsingle),
|
||||
k->bytecount, k->size);
|
||||
}
|
||||
else {
|
||||
failf(data, "Operation timed out after %" CURL_FORMAT_TIMEDIFF_T
|
||||
" milliseconds with %" CURL_FORMAT_CURL_OFF_T " bytes received",
|
||||
Curl_timediff(k->now, data->progress.t_startsingle),
|
||||
Curl_timediff(now, data->progress.t_startsingle),
|
||||
k->bytecount);
|
||||
}
|
||||
result = CURLE_OPERATION_TIMEDOUT;
|
||||
|
@ -3962,7 +3962,6 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn)
|
||||
data->state.httpreq = HTTPREQ_HEAD;
|
||||
|
||||
k->start = Curl_now(); /* start time */
|
||||
k->now = k->start; /* current time is now */
|
||||
k->header = TRUE; /* assume header */
|
||||
k->bytecount = 0;
|
||||
k->ignorebody = FALSE;
|
||||
|
@ -630,7 +630,6 @@ struct SingleRequest {
|
||||
curl_off_t pendingheader; /* this many bytes left to send is actually
|
||||
header and not body */
|
||||
struct curltime start; /* transfer started at this time */
|
||||
struct curltime now; /* current time */
|
||||
enum {
|
||||
HEADER_NORMAL, /* no bad header at all */
|
||||
HEADER_PARTHEADER, /* part of the chunk is a bad header, the rest
|
||||
|
Loading…
Reference in New Issue
Block a user