From 8225c47b04f3f87f7f425d64c0f5c5790b84d6b1 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Tue, 4 Sep 2001 09:18:32 +0000 Subject: [PATCH] patch-bac.tunnelreopen-1 from Brendan Cully. --- mutt_tunnel.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mutt_tunnel.c b/mutt_tunnel.c index 12aadce3a..01e1d729c 100644 --- a/mutt_tunnel.c +++ b/mutt_tunnel.c @@ -45,10 +45,6 @@ static int tunnel_socket_write (CONNECTION* conn, const char* buf, size_t len); /* -- public functions -- */ int mutt_tunnel_socket_setup (CONNECTION *conn) { - TUNNEL_DATA* tunnel = (TUNNEL_DATA*) safe_malloc (sizeof (TUNNEL_DATA)); - - conn->sockdata = tunnel; - conn->open = tunnel_socket_open; conn->close = tunnel_socket_close; conn->read = tunnel_socket_read; @@ -59,11 +55,14 @@ int mutt_tunnel_socket_setup (CONNECTION *conn) static int tunnel_socket_open (CONNECTION *conn) { - TUNNEL_DATA* tunnel = (TUNNEL_DATA*) conn->sockdata; + TUNNEL_DATA* tunnel; int pid; int rc; int pin[2], pout[2]; + tunnel = (TUNNEL_DATA*) safe_malloc (sizeof (TUNNEL_DATA)); + conn->sockdata = tunnel; + mutt_message (_("Connecting with \"%s\"..."), Tunnel); if ((rc = pipe (pin)) == -1) -- 2.40.0