On 8 February 2012 00:15, Alexander Lamaison <sw...@lammy.co.uk> wrote: > On 7 February 2012 18:49, Daniel Stenberg <dan...@haxx.se> wrote: >> On Tue, 7 Feb 2012, Alexander Lamaison wrote: >> >> Will you do the additional edits? > > Sure. I hope today some time.
Ok, here is the next patch; apply it on top of my other one. The changes are more extensive that I'd planned so I'd appreciate some careful review. Basically, the total_read variable turned out to be completely pointless. Once I'd fixed the leftovers processing so that it returned if there was any data, I couldn't work out how it could be anything other than 0 for most of it's lifetime. The only time it was incremented was just after we read data; a situation where we have to return without reading any more data. So I got rid of it. I'm still a little unsure of the code that deals with freeing/iterating chunks. Especially in the case where the read was short (short != EOF). Especially especially in the case where the read was 0 (also 0 != EOF). So could reviewing eyes pay that aspect particular attention. Alex -- Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
0002-Simplified-sftp_read.patch
Description: Binary data
_______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel