cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Cancel request in process

From: Alan Wolfe <alan.wolfe_at_gmail.com>
Date: Tue, 13 Sep 2011 01:10:35 -0700

Is it a divide by zero crash? Look what happens in your code when utotal is
0.

On Sep 13, 2011 1:06 AM, "Oleksiy" <patriot_of_ua_at_ukr.net> wrote:

 int ProgressShow(int (*fun)(double data), double dltotal, double dlnow,
double ultotal, double ulnow)
{
   printf("%f / %f (%g %%)\n", ulnow, ultotal, ulnow*100.0/ultotal);
   if(ulnow*100>50)
        return 1;
   return 0;
}

int main()

{

  //to use this callback

curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);//must be to use progress
cakkback
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, ProgressShow);//callback
function for displaying uploading progress
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, fun);//data sent to the
progress callback as a first parameter

}

When ProgressShow just returns 0 everything works fine. With this program
crashed, but I receive the right output to the Eclipse console after crash.
I'm sending a file with post request.

--- Ориг╕нальне пов╕домлення ---
В╕д кого: " Jeff Pohlmeyer" <yetanothergeek_at_gmail.com>
Кому: " libcurl development" <curl-library_at_cool.haxx.se>
Дата: 12 вересня 2011, 21:22:40
Тема: Re: Cancel request in process

>
> 2011/9/12 Oleksiy <patriot_of_ua_at_ukr.net>:
>
> > When I return from curl_progress_callback n...

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-13