aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-11-05 15:06:30 +0100
committerDaniel Stenberg <daniel@haxx.se>2017-12-01 17:35:15 +0100
commit38aef6dc454d7edc335c44edfec72c7eb151b029 (patch)
tree88ff6e2714b5a8adabcfee2f65c559a769b1a888 /lib/ssh.c
parent75427291e5e06afed7aff0de992cad2cbec5a214 (diff)
libssh2: return CURLE_UPLOAD_FAILED on failure to upload
This brings its in sync with the error code returned by the libssh backend. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index e0e88632d..ef169ade7 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -2368,6 +2368,10 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
failf(conn->data, "%s", err_msg);
state(conn, SSH_SCP_CHANNEL_FREE);
sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err);
+ /* Map generic errors to upload failed */
+ if(sshc->actualcode == CURLE_SSH ||
+ sshc->actualcode == CURLE_REMOTE_FILE_NOT_FOUND)
+ sshc->actualcode = CURLE_UPLOAD_FAILED;
break;
}