curl-library
Progress callbacks, is this a bug?
Date: Wed, 10 Feb 2010 11:05:23 GMT
Hi,
I'm very new to using libcurl so please forgive me if I'm talking rubbish.
The documentation for the CURLOPT_PROGRESSFUNCTION option states that the
callback function will be called "roughly once per second".
And looking at the code (file lib/progress.c, function Curl_pgrsUpdate),
indeed the clock is checked and the progress calculations are only done if
the number of seconds has changed.
If the calculations are done, a flag called "shownow" is set true. The
internal progress meter is not show if this flag is false. However if a
progress callback is set, this function is called before the "shownow" flag
is set.
So, as far as I can see, the behaviour of the library is at odds with what
the documentation says, in that there is no rate limit on calls of the
progress callback function.
So which is correct, is this a bug in the docs or the library?
Thanks for your time.
-- Rik Griffin Software Engineer, Denbridge Marine Ltd Registered in England and Wales at DSG, 43 Castle St, Liverpool. L2 9TL. Registered Number 4850477. ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-02-10