curl-library
CURLOPT_WRITEFUNC: parameter mess.
Date: Mon, 30 Jan 2006 12:12:08 +0100
I'm trying to use libcurl on Fedora FC4/X86_64. After some bug hunting,
I've ended up with the call to my write funtion, set using the
CURLOPT_WRITEFUNC option. The function is declared:
size_t debugWriteFunc(void* ptr, size_t size, size_t nmemb, void* userp)
The parameters I get when libcurl calls my function are:
ptr: 01
size: 1266
nmemb: 5275840
userp 111
- The userp value is OK, set by me for debugging purposes.
- The size value "seems" OK. Content-Length: parameter is 669.
- The ptr value is just wrong, might be nmemb?
- The nmemb value is just wrong.
In short, a mess. The problem occured on curl 7.13. I upgraded to curl
7-15.1 (compiled on my machine), no change.
My test program is C++, but I'm using the C bindings. Specifically, the
function called is just a library function, not a class method. The
overall setup "seems" OK, I've managed to setup, send a message and get
the response from the server. But not to store the response.
Any clues out there?
--------------------------------------------------------------------------
Michael
Received on 2006-01-30