summaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-06-01 14:30:55 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-06-01 14:31:49 +0200
commit45de940cebf6ac897674018c460c1e73e7e082ad (patch)
treed269995d65e01d959dd9f2f4227eb64e17988b21 /lib/ftp.c
parentbb130871c0878dbae97128655103b5944505af92 (diff)
downloadcurl-45de940cebf6ac897674018c460c1e73e7e082ad.tar.gz
lib: make more protocol specific struct fields #ifdefed
... so that they don't take up space if the protocols are disabled in the build. Closes #8944
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 128cdc2f2..346197470 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -783,8 +783,9 @@ static CURLcode ftp_state_user(struct Curl_easy *data,
&conn->proto.ftpc.pp, "USER %s",
conn->user?conn->user:"");
if(!result) {
+ struct ftp_conn *ftpc = &conn->proto.ftpc;
+ ftpc->ftp_trying_alternative = FALSE;
state(data, FTP_USER);
- data->state.ftp_trying_alternative = FALSE;
}
return result;
}
@@ -2622,13 +2623,13 @@ static CURLcode ftp_state_user_resp(struct Curl_easy *data,
(the server denies to log the specified user) */
if(data->set.str[STRING_FTP_ALTERNATIVE_TO_USER] &&
- !data->state.ftp_trying_alternative) {
+ !ftpc->ftp_trying_alternative) {
/* Ok, USER failed. Let's try the supplied command. */
result =
Curl_pp_sendf(data, &ftpc->pp, "%s",
data->set.str[STRING_FTP_ALTERNATIVE_TO_USER]);
if(!result) {
- data->state.ftp_trying_alternative = TRUE;
+ ftpc->ftp_trying_alternative = TRUE;
state(data, FTP_USER);
}
}