Unverified Commit 38aef6dc authored by Nikos Mavrogiannopoulos's avatar Nikos Mavrogiannopoulos Committed by Daniel Stenberg
Browse files

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: default avatarNikos Mavrogiannopoulos <nmav@gnutls.org>
parent 75427291
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
      }

+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ for ssh upload test
disable
</valgrind>
<errorcode>
79
25
</errorcode>

</verify>