summaryrefslogtreecommitdiff
path: root/mu/libexec/pop.c
diff options
context:
space:
mode:
Diffstat (limited to 'mu/libexec/pop.c')
-rw-r--r--mu/libexec/pop.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mu/libexec/pop.c b/mu/libexec/pop.c
index 625096aac..ffcf85443 100644
--- a/mu/libexec/pop.c
+++ b/mu/libexec/pop.c
@@ -476,11 +476,14 @@ com_connect (int argc, char **argv)
if (tls)
{
mu_stream_t tlsstream;
-
- status = mu_tls_client_stream_create (&tlsstream, tcp, tcp, 0);
+
+ status = mu_tlsfd_stream_convert (&tlsstream, tcp, NULL,
+ MU_TLS_CLIENT);
mu_stream_unref (tcp);
if (status)
{
+ if (status == MU_ERR_TRANSPORT_SET)
+ mu_stream_destroy (&tlsstream);
mu_error ("cannot create TLS stream: %s",
mu_strerror (status));
return 0;
@@ -490,6 +493,7 @@ com_connect (int argc, char **argv)
#endif
mu_pop3_set_carrier (pop3, tcp);
status = mu_pop3_connect (pop3);
+ mu_stream_unref (tcp);
}
else
{

Return to:

Send suggestions and report system problems to the System administrator.