aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index e8b717273..d0dd2c746 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -2982,6 +2982,10 @@ static ssize_t scp_send(struct connectdata *conn, int sockindex,
*err = CURLE_AGAIN;
nwrite = 0;
}
+ else if(nwrite < LIBSSH2_ERROR_NONE) {
+ *err = libssh2_session_error_to_CURLE(nwrite);
+ nwrite = -1;
+ }
return nwrite;
}
@@ -3126,6 +3130,10 @@ static ssize_t sftp_send(struct connectdata *conn, int sockindex,
*err = CURLE_AGAIN;
nwrite = 0;
}
+ else if(nwrite < LIBSSH2_ERROR_NONE) {
+ *err = libssh2_session_error_to_CURLE(nwrite);
+ nwrite = -1;
+ }
return nwrite;
}