www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: sftp_write and EAGAIN

Re: sftp_write and EAGAIN

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Sun, 19 Feb 2012 01:54:00 +0000

On 17 February 2012 15:15, Daniel Stenberg <daniel_at_haxx.se> wrote:
> Hi friends,
> As I promised earlier, here is my take at doing the same fix to sftp_write
> as we've worked on for sftp_read.
> I'll appreciate eyeballs and testing!

It looks OK to me and passes my test suite.

One thing: why do we need that final while-loop? Are we keeping that
around (as with sftp_read) solely for the case where nothing was
acked? When would that happen? Can chunk->len ever be zero? Is this
worth keeping the loop around for; unlike sftp_read, we can return 0
without it signalling completion?

Also, why do we increment acked? I can't see any execution of the loop
that could have acked as anything other than zero at the point it is


Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-02-19

the libssh2 team