case LIBSSH2_FX_OK:
return CURLE_OK;
+ case LIBSSH2_ERROR_ALLOC:
+ return CURLE_OUT_OF_MEMORY;
+
case LIBSSH2_FX_NO_SUCH_FILE:
case LIBSSH2_FX_NO_SUCH_PATH:
return CURLE_REMOTE_FILE_NOT_FOUND;
failf(data, "Upload failed: %s", sftp_libssh2_strerror(err));
if(sshc->secondCreateDirs) {
state(conn, SSH_SFTP_CLOSE);
- sshc->actualcode = err;
+ sshc->actualcode = sftp_libssh2_error_to_CURLE(err);
break;
}
else if(((err == LIBSSH2_FX_NO_SUCH_FILE) ||
}
else if(sshc->readdir_len <= 0) {
err = libssh2_sftp_last_error(sshc->sftp_session);
- sshc->actualcode = err;
+ sshc->actualcode = sftp_libssh2_error_to_CURLE(err);
failf(data, "Could not open remote file for reading: %s :: %d",
sftp_libssh2_strerror(err),
libssh2_session_last_errno(sshc->ssh_session));
ssh_err = libssh2_session_last_error(sshc->ssh_session,
&err_msg, NULL, 0);
- err = libssh2_session_error_to_CURLE(ssh_err);
failf(conn->data, "%s", err_msg);
state(conn, SSH_SCP_CHANNEL_FREE);
- sshc->actualcode = err;
+ sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err);
break;
}
}
ssh_err = libssh2_session_last_error(sshc->ssh_session,
&err_msg, NULL, 0);
- err = libssh2_session_error_to_CURLE(ssh_err);
failf(conn->data, "%s", err_msg);
state(conn, SSH_SCP_CHANNEL_FREE);
- sshc->actualcode = err;
+ sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err);
break;
}
}