summaryrefslogtreecommitdiff
path: root/lib/tftp.c
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2010-11-19 13:43:20 +0100
committerKamil Dudka <kdudka@redhat.com>2010-12-06 14:35:42 +0100
commit5c7c9a768d009319520142fcaee1dea33625060f (patch)
treea8c31c739426e32edb76d9b86be951d9cb1191da /lib/tftp.c
parentbf1c102b80698e60972063b269f61ccbe2bfeaa8 (diff)
downloadcurl-5c7c9a768d009319520142fcaee1dea33625060f.tar.gz
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/tftp.c')
-rw-r--r--lib/tftp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tftp.c b/lib/tftp.c
index 46ed2a71e..fc741c941 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -166,7 +166,7 @@ typedef struct tftp_state_data {
static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event) ;
static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) ;
static CURLcode tftp_connect(struct connectdata *conn, bool *done);
-static CURLcode tftp_disconnect(struct connectdata *conn);
+static CURLcode tftp_disconnect(struct connectdata *conn, bool dead_connection);
static CURLcode tftp_do(struct connectdata *conn, bool *done);
static CURLcode tftp_done(struct connectdata *conn,
CURLcode, bool premature);
@@ -925,9 +925,10 @@ static CURLcode tftp_state_machine(tftp_state_data_t *state,
* The disconnect callback
*
**********************************************************/
-static CURLcode tftp_disconnect(struct connectdata *conn)
+static CURLcode tftp_disconnect(struct connectdata *conn, bool dead_connection)
{
tftp_state_data_t *state = conn->proto.tftpc;
+ (void) dead_connection;
/* done, free dynamically allocated pkt buffers */
if(state) {