aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-03-29 11:43:02 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-03-29 11:43:02 +0000
commit371ef80dc3016b60f3e3c2b6786f6c7d6bfe17c2 (patch)
tree79a261c3aa2998fc1add698c90cecf65d26dc712 /lib
parent84b4e9ff7c1eee735e2653db24fbd1fd0ab72ab5 (diff)
When doing FTP-SSL, advance to the next state properly when the response to
AUTH has been received successfully.
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index be4ff413e..3967d119f 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2375,22 +2375,23 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
if((ftpcode == 234) || (ftpcode == 334)) {
/* Curl_SSLConnect is BLOCKING */
result = Curl_SSLConnect(conn, FIRSTSOCKET);
- if(result)
- return result;
- conn->protocol |= PROT_FTPS;
- conn->ssl[SECONDARYSOCKET].use = FALSE; /* clear-text data */
+ if(CURLE_OK == result) {
+ conn->protocol |= PROT_FTPS;
+ conn->ssl[SECONDARYSOCKET].use = FALSE; /* clear-text data */
+ result = ftp_state_user(conn);
+ }
}
else if(ftp->count3 < 1) {
ftp->count3++;
ftp->count1 += ftp->count2; /* get next attempt */
- NBFTPSENDF(conn, "AUTH %s", ftpauth[ftp->count1]);
+ result = Curl_nbftpsendf(conn, "AUTH %s", ftpauth[ftp->count1]);
/* remain in this same state */
}
- else {
+ else
result = ftp_state_user(conn);
- if(result)
- return result;
- }
+
+ if(result)
+ return result;
break;
case FTP_USER: