cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with PROGRESSFUNCTION

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 9 Mar 2002 19:15:37 +0100 (MET)

On Sat, 9 Mar 2002 kapheine_at_hypa.net wrote:

> Like a lot of people, it seems, I am having a program with the
> PROGRESSFUNCTION option. I am using version 7.9.5. The problem is that no
> matter what I pass to PROGRESSFUNCTION, it never gets called. So then I
> went to curl-7.9.5/docs/examples/curlgtk.c and tried to use that, but the
> problem seems to exist there too. Inside of my_progress_func I put a
> fprintf(stderr, ..) line to see if it ever gets there and it doesn't ever
> print anything. The file is downloaded, but the progress bar never gets
> updated. Does anyone have any insight? Does curlgtk.c work for any of you?
> Thanks in advance.

I never understood this problem until the day I was writing the 'custom
progress meter' section in the libcurl-the-guide docs, just a week ago or so.

I then realized that the prototype in the curl.h file was plain wrong (it
said size_t for most arguments where the code uses doubles) and my change of
that was also the reason why --progress-bar broke (and is broken in the 7.9.5
release, fixed since though but the problem was in the client-side code not
the library). The --progress-bar code uses the PROGRESSFUNCTION.

It would help a lot if you set a break-point in progress.c:300 and check what
happens when that source line is reached. Or why it isn't reached.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-03-09