- 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().
This commit is contained in:
Daniel Stenberg
2009-02-20 08:16:03 +00:00
parent be3a78f583
commit af91ff0e06
5 changed files with 43 additions and 21 deletions

View File

@@ -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