Ticket #3406: sftpfs: fix -31 SFTP Protocol Error when transferring file via SFTP...
commit22076e2d8b543ff8356f8307793baf2806620748
authorAndreas Mohr <and@gmx.li>
Thu, 7 Jan 2016 16:59:06 +0000 (7 16:59 +0000)
committerAndrew Borodin <aborodin@vmail.ru>
Thu, 28 Dec 2017 07:18:08 +0000 (28 10:18 +0300)
tree98cf453f3b487c7e0ff5036c1238817b5ee28d15
parent218dcea54320eb0d4ed029dbc0ac661eb4f8fe62
Ticket #3406: sftpfs: fix -31 SFTP Protocol Error when transferring file via SFTP Link.

Initial commit: extend error message with sftp session error.

When LIBSSH2_ERROR_SFTP_PROTOCOL (-31) occurs extend error message
with sftp last error for better failure tracking.

With #3269 patch further sftp protocol error message now looks like
SFTP Protocol Error 3 (-31).

Currently I have no nice solution for print relevant called libssh2 function too
I don't want pollute _to_gliberror() with contant strings all over.

sftp session error 3 means (file) permission denied.

From libssh2-1.5.0/include/libssh2_sftp.h

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
src/vfs/sftpfs/internal.c