pop3.c: Fixed unnecessary state change if starttls fails

The state machine should only be changed to POP3_STARTTLS when the
STLS command has been successfully sent to the server.
This commit is contained in:
Steve Holme 2013-01-27 10:42:32 +00:00
Родитель 499e30c4bb
Коммит 3dbf11d0a1
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -542,7 +542,8 @@ static CURLcode pop3_state_servergreet_resp(struct connectdata *conn,
/* 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(&pop3c->pp, "STLS"); result = Curl_pp_sendf(&pop3c->pp, "STLS");
state(conn, POP3_STARTTLS); if(!result)
state(conn, POP3_STARTTLS);
} }
else else
result = pop3_state_capa(conn); result = pop3_state_capa(conn);