Skip to content

Commit

Permalink
smtp: Updated SMTP_AUTH_PASSWD state constant
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
captain-caveman2k committed Feb 7, 2013
1 parent 86dfcf7 commit e07385f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/smtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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)
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion lib/smtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e07385f

Please sign in to comment.