mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
when unable to initialize sftp session, also log failure reason
This commit is contained in:
parent
bdb2beb8e4
commit
acd7c94598
@ -733,7 +733,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
failf(data, "Failure initialising sftp session");
|
char *err_msg;
|
||||||
|
|
||||||
|
(void)libssh2_session_last_error(sshc->ssh_session,
|
||||||
|
&err_msg, NULL, 0);
|
||||||
|
failf(data, "Failure initializing sftp session: %s", err_msg);
|
||||||
state(conn, SSH_SESSION_FREE);
|
state(conn, SSH_SESSION_FREE);
|
||||||
sshc->actualcode = CURLE_FAILED_INIT;
|
sshc->actualcode = CURLE_FAILED_INIT;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user