diff options
author | Yang Tse <yangsita@gmail.com> | 2008-01-22 17:26:42 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-01-22 17:26:42 +0000 |
commit | acd7c94598cd33495fa167627f0539834f39154b (patch) | |
tree | c946032e5d7b0e698fc99c0056a870de3b56f3db | |
parent | bdb2beb8e4b2f8a2f2ffb47e43046893498ee62d (diff) |
when unable to initialize sftp session, also log failure reason
-rw-r--r-- | lib/ssh.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -733,7 +733,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn) break; } 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); sshc->actualcode = CURLE_FAILED_INIT; break; |