X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mx%2Fpop.c;h=ee18bc3910cf3aaf2340a3efd18e4a17474190b0;hp=189cb5d3eafc7bed431b7ff58da6f837475beafb;hb=98f62b5fcbd680fd5214ee85e1635b84322cbdd1;hpb=88d239144bf6f50ca1eda6db7742281f0ad0f97f diff --git a/lib-mx/pop.c b/lib-mx/pop.c index 189cb5d..ee18bc3 100644 --- a/lib-mx/pop.c +++ b/lib-mx/pop.c @@ -64,7 +64,6 @@ typedef struct { unsigned status : 2; unsigned capabilities : 1; - unsigned use_stls : 2; cmd_status cmd_capa : 2; /* optional command CAPA */ cmd_status cmd_stls : 2; /* optional command STLS */ cmd_status cmd_uidl : 2; /* optional command UIDL */ @@ -661,27 +660,18 @@ static pop_query_status pop_open_connection (pop_data_t * pop_data) /* Attempt STLS if available and desired. */ if (!pop_data->conn->ssf && (pop_data->cmd_stls || mod_ssl.force_tls)) { - if (mod_ssl.force_tls) - pop_data->use_stls = 2; - if (pop_data->use_stls == 0) { - pop_data->use_stls = 1; - if (mod_ssl.starttls) - pop_data->use_stls = 2; + ret = pop_query(pop_data, buf, sizeof(buf), "STLS"); + if (ret == PQ_NOT_CONNECTED) + goto err_conn; + if (ret != PQ_OK) { + mutt_error ("%s", pop_data->err_msg); + mutt_sleep (2); } - if (pop_data->use_stls == 2) { - ret = pop_query(pop_data, buf, sizeof(buf), "STLS"); - if (ret == PQ_NOT_CONNECTED) - goto err_conn; - if (ret != PQ_OK) { - mutt_error ("%s", pop_data->err_msg); - mutt_sleep (2); - } - else if (mutt_ssl_starttls (pop_data->conn)) - { - mutt_error (_("Could not negotiate TLS connection")); - mutt_sleep (2); - return PQ_ERR; - } + else if (mutt_ssl_starttls (pop_data->conn)) + { + mutt_error (_("Could not negotiate TLS connection")); + mutt_sleep (2); + return PQ_ERR; } }