diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-01-27 10:42:32 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-01-27 10:42:32 +0000 |
commit | 3dbf11d0a1f6986331d3a49a78c138f78693efa9 (patch) | |
tree | f8ad45d739f068a1e27af856b728814367eed043 | |
parent | 499e30c4bb185b3a52414ef716543b329ba46a2e (diff) |
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.
-rw-r--r-- | lib/pop3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pop3.c b/lib/pop3.c index 9a9e81b20..18d16e0ff 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -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 to TLS connection now */ result = Curl_pp_sendf(&pop3c->pp, "STLS"); - state(conn, POP3_STARTTLS); + if(!result) + state(conn, POP3_STARTTLS); } else result = pop3_state_capa(conn); |