From af91ff0e068cac8fe710539213b754ce60a28edc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 20 Feb 2009 08:16:03 +0000 Subject: - Linus Nielsen Feltzing reported and helped me repeat and fix a problem with FTP with the multi interface: when a transfer fails, like when aborted by a write callback, the control connection was wrongly closed and thus not re-used properly. This change is also an attempt to cleanup the code somewhat in this area, as now the FTP code attempts to keep (better) track on pending responses necessary to get read in ftp_done(). --- lib/urldata.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/urldata.h') diff --git a/lib/urldata.h b/lib/urldata.h index d1851066e..6969f1ebb 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -438,6 +438,9 @@ struct ftp_conn { size_t nread_resp; /* number of bytes currently read of a server response */ char *linestart_resp; /* line start pointer for the FTP server response reader function */ + bool pending_resp; /* set TRUE when a server response is pending or in + progress, and is cleared once the last response is + read */ int count1; /* general purpose counter for the state machine */ int count2; /* general purpose counter for the state machine */ @@ -904,6 +907,7 @@ struct connectdata { #define PROT_CLOSEACTION PROT_FTP /* these ones need action before socket close */ +#define PROT_DUALCHANNEL PROT_FTP /* these protocols use two connections */ /* 'dns_entry' is the particular host we use. This points to an entry in the DNS cache and it will not get pruned while locked. It gets unlocked in -- cgit v1.2.3