aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-04-07 07:23:52 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-04-07 07:23:52 +0000
commitf052cbee1999a9dce6954efd466fd16c223c16a7 (patch)
tree3cfa144a14f0d844a926fbcf39d0b46e5fb783cb /src
parent1f5e8670e1643f20998625af0d1d22c5e247d92c (diff)
Use curl_off_t for the limit rate values to support REALLY huge values on
such platforms that support large files.
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 682222a43..aaf519ead 100644
--- a/src/main.c
+++ b/src/main.c
@@ -496,8 +496,8 @@ struct Configurable {
HttpReq httpreq;
/* for bandwidth limiting features: */
- size_t sendpersecond; /* send to peer */
- size_t recvpersecond; /* receive from peer */
+ curl_off_t sendpersecond; /* send to peer */
+ curl_off_t recvpersecond; /* receive from peer */
struct timeval lastsendtime;
size_t lastsendsize;
struct timeval lastrecvtime;
@@ -1319,7 +1319,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
{
/* We support G, M, K too */
char *unit;
- unsigned long value = strtol(nextarg, &unit, 0);
+ curl_off_t value = strtoofft(nextarg, &unit, 0);
switch(nextarg[strlen(nextarg)-1]) {
case 'G':
case 'g':
@@ -2339,7 +2339,7 @@ static int my_fread(void *buffer, size_t sz, size_t nmemb, void *userp)
/* If 'addit' is non-zero, it contains the total amount of bytes
uploaded during the last 'timediff' milliseconds. If it is zero,
we use the stored previous size. */
- curl_off_t xfered = addit?addit:config->lastsendsize;
+ curl_off_t xfered = addit?addit:(curl_off_t)config->lastsendsize;
addit = 0; /* clear it for the next round */
if( xfered*1000 > config->sendpersecond*timediff) {