From: Daniel Stenberg Date: Tue, 17 Jul 2007 20:59:53 +0000 (+0000) Subject: Jofell Gallardo posted a libcurl log using FTP that exposed a bug which made X-Git-Tag: curl-7_17_0-preldapfix~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d728aae2a8211a7a9f9f66073bdd672e7a1d2cc;p=thirdparty%2Fcurl.git Jofell Gallardo posted a libcurl log using FTP that exposed a bug which made a control connection that was deemed "dead" to yet be re-used in a following request. We must make sure the connection gets closed on this situation. --- diff --git a/CHANGES b/CHANGES index e5be0fb3ee..570dcba866 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,11 @@ Changelog +Daniel S (17 July 2007) +- Jofell Gallardo posted a libcurl log using FTP that exposed a bug which made + a control connection that was deemed "dead" to yet be re-used in a following + request. + Daniel S (13 July 2007) - Colin Hogben filed bug report #1750274 (http://curl.haxx.se/bug/view.cgi?id=1750274) and submitted a patch for the diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7f1ccf4ec2..6facec9268 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -22,6 +22,7 @@ This release includes the following bugfixes: o CONNECT endless loop o krb5 support builds with Heimdal o added returned error string for connection refused case + o re-use of dead control connections This release includes the following known bugs: @@ -39,6 +40,6 @@ This release would not have looked like this without help, code, reports and advice from friends like these: Dan Fandrich, Song Ma, Daniel Black, Giancarlo Formicuccia, Shmulik Regev, - Daniel Cater, Colin Hogben + Daniel Cater, Colin Hogben, Jofell Gallardo Thanks! (and sorry if I forgot to mention someone) diff --git a/lib/ftp.c b/lib/ftp.c index 61e7958813..dcea9ad0c7 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -3137,7 +3137,7 @@ CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status, bool premature if(!nread && (CURLE_OPERATION_TIMEDOUT == result)) { failf(data, "control connection looks dead"); ftpc->ctl_valid = FALSE; /* mark control connection as bad */ - return result; + conn->bits.close = TRUE; /* mark for closure */ } if(result)