From 45de940cebf6ac897674018c460c1e73e7e082ad Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 1 Jun 2022 14:30:55 +0200 Subject: 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 --- lib/ftp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/ftp.c') 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); } } -- cgit v1.2.1