From 6421d69bff007ac10f6a5dd2663951c10b4bf9c1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 20 Mar 2006 22:51:08 +0000 Subject: David McCreedy fixed libcurl to no longer ignore AUTH failures and now it reacts properly according to the CURLOPT_FTP_SSL setting. --- lib/ftp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ftp.c b/lib/ftp.c index b53f8f309..86d37eafc 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -2430,8 +2430,14 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) result = Curl_nbftpsendf(conn, "AUTH %s", ftpauth[ftp->count1]); /* remain in this same state */ } - else - result = ftp_state_user(conn); + else { + if(data->set.ftp_ssl > CURLFTPSSL_TRY) + /* we failed and CURLFTPSSL_CONTROL or CURLFTPSSL_ALL is set */ + result = CURLE_FTP_SSL_FAILED; + else + /* ignore the failure and continue */ + result = ftp_state_user(conn); + } if(result) return result; -- cgit v1.2.3