Slight bug in the c/c++ API (or maybe just docs)
Date: Fri, 07 Dec 2001 17:48:36 -0700
The CURLOPT_READFUNCTION documentation talks about returning a -1 on error, but
size_t is unsigned (at least on RH 7.2 Linux)
Maybe you want ssize_t arguments??
Function pointer that should match the following
prototype: size_t function( void *ptr, size_t size,
size_t nmemb, void *stream); This function gets
called by libcurl as soon as it needs to read data
in order to send it to the peer. The data area
pointed at by the pointer ptr may be filled with at
most size multiplied with nmemb number of bytes.
Your function must return the actual number of bytes
that you stored in that memory area. Returning -1
will signal an error to the library and cause it to
abort the current transfer immediately (with a
CURLE_READ_ERROR return code).
-- Ben Greear <greearb_at_candelatech.com> <Ben_Greear AT excite.com> President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greearReceived on 2001-12-08