aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-01-24 19:09:12 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-01-24 19:09:12 +0000
commit5f9cbc420935eac500dc961c109d57df2f027326 (patch)
treee28b966a6639025d84301d1508e0289ac67c7eb5
parent3239f059b82d2b20a76f7470d8c4a334755f25c4 (diff)
Only shut down SSL if the CCC command succeeded.
-rw-r--r--lib/ftp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 900def4bb..2ae973790 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 */