aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-03-23 00:03:34 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-03-23 00:03:34 +0000
commit6bb9bd8b6975696397e27008b525c06da88a631f (patch)
treed3ae5540fa50a997c339b9fb11894428d6c5ff43
parent72175c738f8abd36140a42bbc21c0a82c6c740d2 (diff)
Don't shut down sftp in an error if it was never started.
-rw-r--r--lib/ssh.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index bc8459784..0a3ed420d 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -434,6 +434,8 @@ CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done)
/*
* At this point we have an authenticated ssh session.
*/
+ infof(conn->data, "Authentication complete\n");
+
conn->sockfd = sock;
conn->writesockfd = CURL_SOCKET_BAD;
@@ -478,8 +480,6 @@ CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done)
if (conn->protocol == PROT_SCP) {
real_path = (char *)malloc(working_path_len+1);
if (real_path == NULL) {
- libssh2_sftp_shutdown(ssh->sftp_session);
- ssh->sftp_session = NULL;
libssh2_session_free(ssh->ssh_session);
ssh->ssh_session = NULL;
Curl_safefree(working_path);
@@ -526,8 +526,6 @@ CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done)
}
}
else {
- libssh2_sftp_shutdown(ssh->sftp_session);
- ssh->sftp_session = NULL;
libssh2_session_free(ssh->ssh_session);
ssh->ssh_session = NULL;
Curl_safefree(working_path);