Commit 0e5e720c authored by Steve Holme's avatar Steve Holme
Browse files

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.
parent 3dbf11d0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -543,6 +543,7 @@ 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
       to TLS connection now */
    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "STARTTLS");
    if(!result)
      state(conn, SMTP_STARTTLS);
  }
  else