curl-library
Re: download with http
From: Eduardo García <garedagmad_at_telefonica.net>
Date: Mon, 29 Mar 2004 09:27:58 +0200
Date: Mon, 29 Mar 2004 09:27:58 +0200
I think I can guess your error:
Write callback function must return exactly the size of the received
buffer, in bytes. In your code you always return 0 as far as you are
returnning 'nrcv' variable which has been decreased up to 0. Try to return
'size*nmemb' instead.
size_t write_callback( void *ptr, size_t size, size_t nmemb, void *stream)
>{
>...
> size_t nrcv ;
> nrcv = size*nmemb;
...
> char* rcvptr = (char*) ptr;
> for( ; nrcv > 0; nrcv-- )
> {
...
> }
...
> return nrcv;
>};
Received on 2004-03-29