aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-03-20 22:51:08 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-03-20 22:51:08 +0000
commit6421d69bff007ac10f6a5dd2663951c10b4bf9c1 (patch)
tree115aee0d37c30a78bdcdfb63a409d03ba40d64c9 /lib/ftp.c
parent18081e30e1b76f3bd021b42e12e4a9f4f90554e8 (diff)
David McCreedy fixed libcurl to no longer ignore AUTH failures and now it
reacts properly according to the CURLOPT_FTP_SSL setting.
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c10
1 files changed, 8 insertions, 2 deletions
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;