diff options
author | Kamil Dudka <kdudka@redhat.com> | 2010-11-19 13:43:20 +0100 |
---|---|---|
committer | Kamil Dudka <kdudka@redhat.com> | 2010-12-06 14:35:42 +0100 |
commit | 5c7c9a768d009319520142fcaee1dea33625060f (patch) | |
tree | a8c31c739426e32edb76d9b86be951d9cb1191da /lib/ssh.c | |
parent | bf1c102b80698e60972063b269f61ccbe2bfeaa8 (diff) |
url: provide dead_connection flag in Curl_handler::disconnect
It helps to prevent a hangup with some FTP servers in case idle session
timeout has exceeded. But it may be useful also for other protocols
that send any quit message on disconnect. Currently used by FTP, POP3,
IMAP and SMTP.
Diffstat (limited to 'lib/ssh.c')
-rw-r--r-- | lib/ssh.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -135,13 +135,13 @@ static CURLcode scp_done(struct connectdata *conn, CURLcode, bool premature); static CURLcode scp_doing(struct connectdata *conn, bool *dophase_done); -static CURLcode scp_disconnect(struct connectdata *conn); +static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection); static CURLcode sftp_done(struct connectdata *conn, CURLcode, bool premature); static CURLcode sftp_doing(struct connectdata *conn, bool *dophase_done); -static CURLcode sftp_disconnect(struct connectdata *conn); +static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection); static CURLcode sftp_perform(struct connectdata *conn, bool *connected, @@ -2689,10 +2689,11 @@ static CURLcode ssh_do(struct connectdata *conn, bool *done) /* BLOCKING, but the function is using the state machine so the only reason this is still blocking is that the multi interface code has no support for disconnecting operations that takes a while */ -static CURLcode scp_disconnect(struct connectdata *conn) +static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection) { CURLcode result = CURLE_OK; struct ssh_conn *ssh = &conn->proto.sshc; + (void) dead_connection; Curl_safefree(conn->data->state.proto.ssh); conn->data->state.proto.ssh = NULL; @@ -2853,9 +2854,10 @@ static CURLcode sftp_doing(struct connectdata *conn, /* BLOCKING, but the function is using the state machine so the only reason this is still blocking is that the multi interface code has no support for disconnecting operations that takes a while */ -static CURLcode sftp_disconnect(struct connectdata *conn) +static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection) { CURLcode result = CURLE_OK; + (void) dead_connection; DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n")); |