diff options
Diffstat (limited to 'lib/speedcheck.c')
-rw-r--r-- | lib/speedcheck.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/speedcheck.c b/lib/speedcheck.c index 3112d2575..274ceb108 100644 --- a/lib/speedcheck.c +++ b/lib/speedcheck.c @@ -34,36 +34,36 @@ #include "sendf.h" #include "speedcheck.h" -void Curl_speedinit(struct UrlData *data) +void Curl_speedinit(struct SessionHandle *data) { - memset(&data->keeps_speed, 0, sizeof(struct timeval)); + memset(&data->state.keeps_speed, 0, sizeof(struct timeval)); } -CURLcode Curl_speedcheck(struct UrlData *data, +CURLcode Curl_speedcheck(struct SessionHandle *data, struct timeval now) { if((data->progress.current_speed >= 0) && - data->low_speed_time && - (Curl_tvlong(data->keeps_speed) != 0) && - (data->progress.current_speed < data->low_speed_limit)) { + data->set.low_speed_time && + (Curl_tvlong(data->state.keeps_speed) != 0) && + (data->progress.current_speed < data->set.low_speed_limit)) { /* We are now below the "low speed limit". If we are below it for "low speed time" seconds we consider that enough reason to abort the download. */ - if( Curl_tvdiff(now, data->keeps_speed) > data->low_speed_time) { + if( Curl_tvdiff(now, data->state.keeps_speed) > data->set.low_speed_time) { /* we have been this slow for long enough, now die */ failf(data, "Operation too slow. " "Less than %d bytes/sec transfered the last %d seconds", - data->low_speed_limit, - data->low_speed_time); + data->set.low_speed_limit, + data->set.low_speed_time); return CURLE_OPERATION_TIMEOUTED; } } else { /* we keep up the required speed all right */ - data->keeps_speed = now; + data->state.keeps_speed = now; } return CURLE_OK; } |