X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_tunnel.c;h=a37fa118945f41e884eca645ef03898394f3ad6b;hp=34a578961bffa5ed7825e89cc89768f9a9d48ff3;hb=45980bfb6afb38d3c1cb70c889cc37b22b8c533b;hpb=ba5e3af4ea19e1d20c80941c077039871ec84258 diff --git a/mutt_tunnel.c b/mutt_tunnel.c index 34a5789..a37fa11 100644 --- a/mutt_tunnel.c +++ b/mutt_tunnel.c @@ -12,13 +12,14 @@ # include "config.h" #endif +#include +#include +#include + #include "mutt.h" #include "mutt_socket.h" #include "mutt_tunnel.h" -#include "lib/mem.h" -#include "lib/intl.h" -#include "lib/str.h" #include #include @@ -59,7 +60,7 @@ static int tunnel_socket_open (CONNECTION * conn) int rc; int pin[2], pout[2]; - tunnel = (TUNNEL_DATA *) mem_malloc (sizeof (TUNNEL_DATA)); + tunnel = p_new(TUNNEL_DATA, 1); conn->sockdata = tunnel; mutt_message (_("Connecting with \"%s\"..."), Tunnel); @@ -87,7 +88,7 @@ static int tunnel_socket_open (CONNECTION * conn) /* Don't let the subprocess think it can use the controlling tty */ setsid (); - execl (EXECSHELL, "sh", "-c", Tunnel, NULL); + execl ("/bin/sh", "sh", "-c", Tunnel, NULL); _exit (127); } mutt_unblock_signals_system (1); @@ -129,7 +130,7 @@ static int tunnel_socket_close (CONNECTION * conn) NONULL(mutt_strsysexit(WEXITSTATUS(status)))); mutt_sleep (2); } - mem_free (&conn->sockdata); + p_delete(&conn->sockdata); return 0; }