cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_multi_socket problem, not reading all data

From: Ragnar Lonn <ragnar_at_gatorhole.com>
Date: Tue, 21 Oct 2008 08:51:07 +0200

Dan Fandrich wrote:
> [...]
>
>> size_t client_write_data(void *buffer, size_t size, size_t nmemb, void
>> *userp) {
>> total_bytes += (unsigned int)(nmemb * size);
>> }
>>
>
> You're not returning anything from the write callback. Which means that
> libcurl treats the garbage that is returned as a code to abort the download.
> You should really turn on warnings in your compiler to catch this kind
> of thing.
>

Ahh, thanks! It's the first time I've ever used either curl_multi_socket
or epoll(), so I assumed there was something I was doing wrong with them
specifically. I never thought to look for something like this. Thanks again!

Regards,

  /Ragnar
Received on 2008-10-21