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: Mon, 1 Nov 2010 19:44:00 +0100 (CET)

On Mon, 1 Nov 2010, Mark Riordan wrote:

> Now I'm getting error -21.

Great, now we're at least narrowing it down.

-21 is LIBSSH2_ERROR_CHANNEL_FAILURE and it is only used in a few places.

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.

> My test file is 60 MB and it's not compressible. But I don't think the size
> is important, as the upload fails right away.

Right. If we're lucky you get the error at src/sftp.c:198 (as that's marked as
a TODO and I know what the problem with it is and what we should do to fix
it....)

I think the main reason I haven't seen this problem is that I've only tested
on Linux and I figure the TCP stack differences are big enough to be important
here.

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