curl-library
some observation with read callback
Date: Thu, 21 Feb 2008 17:10:41 +0100
Hi,
when I played with the ftpupload example, and added the read callback function,
I saw that the callback gets always called one time more as needed.
F.e. I had a text file with 26 bytes which I would assume that it fits into the buffer;
but anyhow I get _two_ calls to the callback: the first reads 26 bytes, and the second 0.
I'm asking me if that could be related to the NetWare bug I saw with 7.16.5 and later
which the Novell developer identified as a call with zero bytes to the socket function?
I would expect that at the place the where callback is called there would be a compare
if the returned bytes count is less than the passed-in buffer size, and if so this should
indicate that the file is already completely read; currently it seems that there's only
a check if the callback returns 0...
Anyone has a pointer where the callback is called and this check happens?
couldnt find it within few minutes (or overlooked?), and no time to dig through more code...
thanks, Guenter.
Received on 2008-02-21