Skip to content
Snippets Groups Projects
Commit 499e30c4 authored by Steve Holme's avatar Steve Holme
Browse files

imap.c: Fixed unnecessary state change if starttls fails

The state machine should only be changed to IMAP_STARTTLS when the
STARTTLS command has been successfully sent to the server.
parent 73fae581
No related branches found
No related tags found
No related merge requests found
......@@ -601,7 +601,8 @@ static CURLcode imap_state_servergreet_resp(struct connectdata *conn,
to TLS connection now */
const char *str = getcmdid(conn);
result = imap_sendf(conn, str, "%s STARTTLS", str);
state(conn, IMAP_STARTTLS);
if(!result)
state(conn, IMAP_STARTTLS);
}
else
result = imap_state_capability(conn);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment