mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:43:33 +03:00
limit-rate: kick in even before "limit" data has been received
... and make sure to avoid integer overflows with really large values. Reported-by: 刘佩东 Fixes #2371 Closes #2373
This commit is contained in:
parent
029ae11034
commit
72a0f6251a
2 changed files with 29 additions and 23 deletions
|
|
@ -7,7 +7,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -49,11 +49,11 @@ void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size);
|
|||
int Curl_pgrsUpdate(struct connectdata *);
|
||||
void Curl_pgrsResetTransferSizes(struct Curl_easy *data);
|
||||
void Curl_pgrsTime(struct Curl_easy *data, timerid timer);
|
||||
long Curl_pgrsLimitWaitTime(curl_off_t cursize,
|
||||
curl_off_t startsize,
|
||||
curl_off_t limit,
|
||||
struct curltime start,
|
||||
struct curltime now);
|
||||
timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize,
|
||||
curl_off_t startsize,
|
||||
curl_off_t limit,
|
||||
struct curltime start,
|
||||
struct curltime now);
|
||||
|
||||
/* Don't show progress for sizes smaller than: */
|
||||
#define LEAST_SIZE_PROGRESS BUFSIZE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue