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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -601,6 +601,7 @@ 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);
    if(!result)
      state(conn, IMAP_STARTTLS);
  }
  else