cURL / Mailing Lists / curl-library / Single Mail


(no subject)

From: Caner Bulut <>
Date: Sat, 19 May 2007 18:26:13 +0000


i have a problem.Below code when 1 and 2 lines blok,
CURLOPT_NOPROGRESS works well.But i want to my own progress
function.But when i open line 1 and 2,and in progress_callback to
write some info,the error 42 occur.It means that
callback_function_aborted.I dont understand why it occurs.

 int progress_callback( double *clientp,
                        double t,
                        double d,
                        double ultotal,
                        double ulnow)
printf("hello \n");

      curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
      curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
      curl_easy_setopt(curl, CURLOPT_READFUNCTION, my_read_func);
      curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
// curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION,
progress_callback); (1)
// curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &Bar); (2)
      res = curl_easy_perform(curl);

İf you can solve this problem or have an example please help.

Caner Bulut.
Received on 2007-05-19