cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Maximum offset value supported by CURLOPT_RESUME_FROM(_LARGE) ?

From: Yang Tse <yangsita_at_gmail.com>
Date: Fri, 19 Jun 2009 11:31:03 +0200

2009/6/18, Cogentree CT <cogentree_at_gmail.com>:

> I am using CURLOPT_RESUME_FROM_LARGE for a file which is more than 4 GB
> (4441787445 bytes) in size.
> I wanted download to restart; at offset: 4441487245 bytes.
> But, whenever I specify curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE,
> 4441487245L) it 're-sets' the value.
> [...]
> So, I want to know weather that big value is supported by
> CURLOPT_RESUME_FROM(_LARGE) ??

Which OS and libcurl version?

The curl_easy_setopt() man page states that for
CURLOPT_RESUME_FROM_LARGE you must pass a curl_off_t dada type as
parameter.

In your case you want to use a string literal constant, so in order to
get the appropriate postfix for the constant you could use the
CURL_OFF_T_C() macro.

curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, CURL_OFF_T_C(4441487245L));

-- 
-=[Yang]=-
Received on 2009-06-19