From: Dan Fandrich Date: Wed, 24 Jan 2007 19:09:12 +0000 (+0000) Subject: Only shut down SSL if the CCC command succeeded. X-Git-Tag: curl-7_16_1~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f9cbc420935eac500dc961c109d57df2f027326;p=thirdparty%2Fcurl.git Only shut down SSL if the CCC command succeeded. --- diff --git a/lib/ftp.c b/lib/ftp.c index 900def4bba..2ae973790a 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -2560,12 +2560,14 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) break; case FTP_CCC: - /* First shut down the SSL layer (note: this call will block) */ - result = Curl_ssl_shutdown(conn, FIRSTSOCKET); - - if(result) { - failf(conn->data, "Failed to clear the command channel (CCC)"); - return result; + if (ftpcode < 500) { + /* First shut down the SSL layer (note: this call will block) */ + result = Curl_ssl_shutdown(conn, FIRSTSOCKET); + + if(result) { + failf(conn->data, "Failed to clear the command channel (CCC)"); + return result; + } } /* Then continue as normal */