X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_socket.c;h=f0ca158639b498de0f27b43473b2a0e05b8c7a3e;hp=6cccc7afa62ed615c26fac9a53e9ad5787bf5ecf;hb=abcb4c00cbb9994087487573aa3bddd02a64ff5e;hpb=a8477ebaa09990b3688164cbe5cf661c4189541d diff --git a/mutt_socket.c b/mutt_socket.c index 6cccc7a..f0ca158 100644 --- a/mutt_socket.c +++ b/mutt_socket.c @@ -189,7 +189,7 @@ void mutt_socket_free (CONNECTION * conn) /* head is special case, doesn't need prev updated */ if (iter == conn) { Connections = iter->next; - FREE (&iter); + mem_free (&iter); return; } @@ -197,7 +197,7 @@ void mutt_socket_free (CONNECTION * conn) if (iter->next == conn) { tmp = iter->next; iter->next = tmp->next; - FREE (&tmp); + mem_free (&tmp); return; } iter = iter->next; @@ -237,10 +237,8 @@ CONNECTION *mutt_conn_find (const CONNECTION * start, const ACCOUNT * account) if (Tunnel && *Tunnel) mutt_tunnel_socket_setup (conn); else if (account->flags & M_ACCT_SSL) { -#ifdef USE_SSL - ssl_socket_setup (conn); -#elif USE_GNUTLS - if (mutt_gnutls_socket_setup (conn) < 0) { +#if defined (USE_SSL) || defined (USE_GNUTLS) + if (mutt_ssl_socket_setup (conn) < 0) { mutt_socket_free (conn); return NULL; } @@ -326,7 +324,7 @@ static CONNECTION *socket_new_conn (void) { CONNECTION *conn; - conn = (CONNECTION *) safe_calloc (1, sizeof (CONNECTION)); + conn = (CONNECTION *) mem_calloc (1, sizeof (CONNECTION)); conn->fd = -1; return conn; @@ -406,11 +404,12 @@ int raw_socket_open (CONNECTION * conn) rc = getaddrinfo (host_idna, port, &hints, &res); # ifdef HAVE_LIBIDN - FREE (&host_idna); + mem_free (&host_idna); # endif if (rc) { mutt_error (_("Could not find the host \"%s\""), conn->account.host); + mutt_sleep (2); return -1; } @@ -456,7 +455,7 @@ int raw_socket_open (CONNECTION * conn) if ((he = gethostbyname (host_idna)) == NULL) { # ifdef HAVE_LIBIDN - FREE (&host_idna); + mem_free (&host_idna); # endif mutt_error (_("Could not find the host \"%s\""), conn->account.host); @@ -464,7 +463,7 @@ int raw_socket_open (CONNECTION * conn) } # ifdef HAVE_LIBIDN - FREE (&host_idna); + mem_free (&host_idna); # endif mutt_message (_("Connecting to %s..."), conn->account.host);