1
0
mirror of https://github.com/moparisthebest/curl synced 2024-10-31 15:45:12 -04:00

smtp: Updated SMTP_AUTH_PASSWD state constant

Changed the SMTP_AUTH_PASSWD state constant to SMTP_AUTH_LOGIN_PASSWD to
better describe the state as the second part of an AUTH LOGIN command,
as well as for consistency with the imap and pop3 modules.
This commit is contained in:
Steve Holme 2013-02-07 20:37:11 +00:00
parent 86dfcf737d
commit e07385f853
2 changed files with 6 additions and 6 deletions

View File

@ -293,7 +293,7 @@ static void state(struct connectdata *conn, smtpstate newstate)
"UPGRADETLS",
"AUTH_PLAIN",
"AUTH_LOGIN",
"AUTH_PASSWD",
"AUTH_LOGIN_PASSWD",
"AUTH_CRAMMD5",
"AUTH_DIGESTMD5",
"AUTH_DIGESTMD5_RESP",
@ -416,7 +416,7 @@ static CURLcode smtp_authenticate(struct connectdata *conn)
if(smtpc->authmechs & SASL_MECH_LOGIN) {
mech = "LOGIN";
state1 = SMTP_AUTH_LOGIN;
state2 = SMTP_AUTH_PASSWD;
state2 = SMTP_AUTH_LOGIN_PASSWD;
smtpc->authused = SASL_MECH_LOGIN;
result = Curl_sasl_create_login_message(conn->data, conn->user,
&initresp, &len);
@ -650,7 +650,7 @@ static CURLcode smtp_state_auth_login_resp(struct connectdata *conn,
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser);
if(!result)
state(conn, SMTP_AUTH_PASSWD);
state(conn, SMTP_AUTH_LOGIN_PASSWD);
}
Curl_safefree(authuser);
@ -660,7 +660,7 @@ static CURLcode smtp_state_auth_login_resp(struct connectdata *conn,
return result;
}
/* For responses to user entry of AUTH LOGIN */
/* For AUTH LOGIN user entry responses */
static CURLcode smtp_state_auth_passwd_resp(struct connectdata *conn,
int smtpcode,
smtpstate instate)
@ -1173,7 +1173,7 @@ static CURLcode smtp_statemach_act(struct connectdata *conn)
result = smtp_state_auth_login_resp(conn, smtpcode, smtpc->state);
break;
case SMTP_AUTH_PASSWD:
case SMTP_AUTH_LOGIN_PASSWD:
result = smtp_state_auth_passwd_resp(conn, smtpcode, smtpc->state);
break;

View File

@ -38,7 +38,7 @@ typedef enum {
(multi mode only) */
SMTP_AUTH_PLAIN,
SMTP_AUTH_LOGIN,
SMTP_AUTH_PASSWD,
SMTP_AUTH_LOGIN_PASSWD,
SMTP_AUTH_CRAMMD5,
SMTP_AUTH_DIGESTMD5,
SMTP_AUTH_DIGESTMD5_RESP,