Subject: Re: libssh2_sftp_write now fails with return code -21

Re: libssh2_sftp_write now fails with return code -21

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 2 Nov 2010 19:19:33 +0100 (CET)

On Tue, 2 Nov 2010, Mark Riordan wrote:

>> Can you check what error message string libssh2_session_last_error()
>> returns after you've got the error? It should help us to pinpoint exactly
>> which of the channel failures it was.
>
> libssh2_session_last_error returns "Waiting for SFTP status".

Cool, thanks!

> (If it's waiting, it's not very patient, as the error occurs immediately.)

Well, the error occured when it was in fact waiting.

I believe the problem was that the code didn't properly deal with the 32bit
length field (that starts each SFTP packet) when the whole field could not be
read at once.

I've pushed a fix for this, please try again and if it still fails I'm
interested in the return code and error message again!

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-11-02