mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:33:44 +03:00
smtp.c: Fixed unnecessary state change if starttls fails
The state machine should only be changed to SMTP_STARTTLS when the STARTTLS command has been successfully sent to the server.
This commit is contained in:
parent
3dbf11d0a1
commit
0e5e720c19
1 changed files with 2 additions and 1 deletions
|
|
@ -543,7 +543,8 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
|
||||||
/* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
|
/* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
|
||||||
to TLS connection now */
|
to TLS connection now */
|
||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "STARTTLS");
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "STARTTLS");
|
||||||
state(conn, SMTP_STARTTLS);
|
if(!result)
|
||||||
|
state(conn, SMTP_STARTTLS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
result = smtp_authenticate(conn);
|
result = smtp_authenticate(conn);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue