Subject: Re: SFTP issues

Re: SFTP issues

From: Peter Stuge <peter_at_stuge.se>
Date: Tue, 7 Feb 2012 17:38:12 +0100

Alexander Lamaison wrote:
> >>      while(chunk) {
..
> >>              rc = _libssh2_channel_write(channel, 0,
> >>                                          &chunk->packet[chunk->sent],
> >>                                          chunk->lefttosend);
..
> > It doesn't seem like there is any point in having this loop anymore,
> > since libssh2 must return after every call to _channel_write() in any
> > case.
>
> Not every call, right? Only when it returns an error.

Yes, every call, because if there was data received successfully it
must be given back to the caller before trying to write to the
channel again, since writing can cause EAGAIN.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-02-07