Subject: libssh2_sftp_write now fails with return code -21

libssh2_sftp_write now fails with return code -21

From: Mark Riordan <>
Date: Mon, 1 Nov 2010 11:51:43 -0500

> I've worked on getting rid of all the -1 return codes since it is too
> error (that previously was used pretty much all over and didn't really
> much). I found some new cases that would cause -1 to get returned just now

> though, and I've pushed a change that hopefully will make you get a
> error code (and error message) that can be useful to better track this
> Please get these changes and re-run.

Good idea.
Now I'm getting error -21.
My latest round of testing was done only with Windows 2003R2 as the client

> How big file do you send?

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.

> How's the round-trip delay between your client and
> the server (roughly)?

Less than 1 ms, according to ping.

> What server software are you using?

Sun Solaris, with whatever their standard sshd is.
And Ubuntu 10.04 with OpenSSH.
Both servers now return -21 with the latest libssh2.

Mark R

Received on 2010-11-01