mirror of
https://github.com/moparisthebest/curl
synced 2024-11-15 22:15:13 -05:00
smtp: Re-factored the final SMTP_AUTH constant
Changed the final SMTP_AUTH constant to SMTP_AUTH_FINAL for consistency with the response function.
This commit is contained in:
parent
afad1ce753
commit
ad3177da24
14
lib/smtp.c
14
lib/smtp.c
@ -460,7 +460,7 @@ static CURLcode smtp_authenticate(struct connectdata *conn)
|
|||||||
else if(smtpc->authmechs & SASL_MECH_PLAIN) {
|
else if(smtpc->authmechs & SASL_MECH_PLAIN) {
|
||||||
mech = "PLAIN";
|
mech = "PLAIN";
|
||||||
state1 = SMTP_AUTH_PLAIN;
|
state1 = SMTP_AUTH_PLAIN;
|
||||||
state2 = SMTP_AUTH;
|
state2 = SMTP_AUTH_FINAL;
|
||||||
smtpc->authused = SASL_MECH_PLAIN;
|
smtpc->authused = SASL_MECH_PLAIN;
|
||||||
result = Curl_sasl_create_plain_message(conn->data, conn->user,
|
result = Curl_sasl_create_plain_message(conn->data, conn->user,
|
||||||
conn->passwd, &initresp, &len);
|
conn->passwd, &initresp, &len);
|
||||||
@ -622,7 +622,7 @@ static CURLcode smtp_state_auth_plain_resp(struct connectdata *conn,
|
|||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth);
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth);
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
state(conn, SMTP_AUTH);
|
state(conn, SMTP_AUTH_FINAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Curl_safefree(plainauth);
|
Curl_safefree(plainauth);
|
||||||
@ -696,7 +696,7 @@ static CURLcode smtp_state_auth_login_password_resp(struct connectdata *conn,
|
|||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd);
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd);
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
state(conn, SMTP_AUTH);
|
state(conn, SMTP_AUTH_FINAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Curl_safefree(authpasswd);
|
Curl_safefree(authpasswd);
|
||||||
@ -751,7 +751,7 @@ static CURLcode smtp_state_auth_cram_resp(struct connectdata *conn,
|
|||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", rplyb64);
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", rplyb64);
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
state(conn, SMTP_AUTH);
|
state(conn, SMTP_AUTH_FINAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Curl_safefree(rplyb64);
|
Curl_safefree(rplyb64);
|
||||||
@ -821,7 +821,7 @@ static CURLcode smtp_state_auth_digest_resp_resp(struct connectdata *conn,
|
|||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "");
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "");
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
state(conn, SMTP_AUTH);
|
state(conn, SMTP_AUTH_FINAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -898,7 +898,7 @@ static CURLcode smtp_state_auth_ntlm_type2msg_resp(struct connectdata *conn,
|
|||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", type3msg);
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", type3msg);
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
state(conn, SMTP_AUTH);
|
state(conn, SMTP_AUTH_FINAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Curl_safefree(type3msg);
|
Curl_safefree(type3msg);
|
||||||
@ -1209,7 +1209,7 @@ static CURLcode smtp_statemach_act(struct connectdata *conn)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case SMTP_AUTH:
|
case SMTP_AUTH_FINAL:
|
||||||
result = smtp_state_auth_final_resp(conn, smtpcode, smtpc->state);
|
result = smtp_state_auth_final_resp(conn, smtpcode, smtpc->state);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ typedef enum {
|
|||||||
SMTP_AUTH_DIGESTMD5_RESP,
|
SMTP_AUTH_DIGESTMD5_RESP,
|
||||||
SMTP_AUTH_NTLM,
|
SMTP_AUTH_NTLM,
|
||||||
SMTP_AUTH_NTLM_TYPE2MSG,
|
SMTP_AUTH_NTLM_TYPE2MSG,
|
||||||
SMTP_AUTH,
|
SMTP_AUTH_FINAL,
|
||||||
SMTP_MAIL, /* MAIL FROM */
|
SMTP_MAIL, /* MAIL FROM */
|
||||||
SMTP_RCPT, /* RCPT TO */
|
SMTP_RCPT, /* RCPT TO */
|
||||||
SMTP_DATA,
|
SMTP_DATA,
|
||||||
|
Loading…
Reference in New Issue
Block a user