cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Progress callback function problem with ftp

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 28 Apr 2006 23:29:58 +0200 (CEST)

On Fri, 28 Apr 2006, Gunjan Velani wrote:

> I dont know whether to term this as a bug in libcurl or whether this is how
> ftp works.

The progress callback is called exactly the same for all protocols libcurl
supports.

> I've been using libcurl in my application developed using vc++ 6 to download
> a file via ftp. i am also using a progress bar whose value gets updated with
> the calback function which i specify. Everything works fine when i use that
> to download a 10 mb file. But if i use the same code to download a bigger
> file with a size of 85 megs, the progress bar goes nicely upto something
> like 45-50% and then falls back to zero and starts again.

That sounds like you're doing something wrong. Like perhaps not having your
callback declared to use doubles for the four sizes passed on to it.

There's no difference in the callback code for 10MB or 100MB or even
1000000MB.

And I don't suspect any bug in this area really, since it's been largely
untouched for years and we've never seen a bug report like this before.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-04-28