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.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mu/libexec/pop.c b/mu/libexec/pop.c
index 7d7d57bed..0beb75191 100644
--- a/mu/libexec/pop.c
+++ b/mu/libexec/pop.c
@@ -1,5 +1,5 @@
/* GNU Mailutils -- a suite of utilities for electronic mail
- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Copyright (C) 2010-2024 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -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
{
@@ -599,6 +603,7 @@ struct mutool_command pop_comtab[] = {
int
main (int argc, char **argv)
{
+ mu_set_program_name (argv[0]);
mu_registrar_record (mu_pop_record);
mu_registrar_record (mu_pops_record);

Return to:

Send suggestions and report system problems to the System administrator.