X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-sys%2Fmutt_tunnel.c;h=8af79f8dcbe39aa8a2b7afe14722335b979da046;hp=a37fa118945f41e884eca645ef03898394f3ad6b;hb=95986f5aee1c2ee7d12c4b1e4bc47874856c5831;hpb=ccf2b75a9ed50a79c4d8e5d6235c7313fcd3719a diff --git a/lib-sys/mutt_tunnel.c b/lib-sys/mutt_tunnel.c index a37fa11..8af79f8 100644 --- a/lib-sys/mutt_tunnel.c +++ b/lib-sys/mutt_tunnel.c @@ -8,25 +8,20 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include -#include -#include -#include +#include +#include +#include + +#include #include "mutt.h" + +#include "exit.h" #include "mutt_socket.h" #include "mutt_tunnel.h" - - -#include -#include -#include -#include -#include -#include +#include "mutt_signal.h" /* -- data types -- */ typedef struct { @@ -38,9 +33,9 @@ typedef struct { /* forward declarations */ static int tunnel_socket_open (CONNECTION *); static int tunnel_socket_close (CONNECTION *); -static int tunnel_socket_read (CONNECTION * conn, char *buf, size_t len); +static int tunnel_socket_read (CONNECTION * conn, char *buf, ssize_t len); static int tunnel_socket_write (CONNECTION * conn, const char *buf, - size_t len); + ssize_t len); /* -- public functions -- */ int mutt_tunnel_socket_setup (CONNECTION * conn) @@ -127,14 +122,14 @@ static int tunnel_socket_close (CONNECTION * conn) if (!WIFEXITED(status) || WEXITSTATUS(status)) { mutt_error(_("Tunnel to %s returned error %d (%s)"), conn->account.host, WEXITSTATUS(status), - NONULL(mutt_strsysexit(WEXITSTATUS(status)))); + m_strsysexit(WEXITSTATUS(status))); mutt_sleep (2); } p_delete(&conn->sockdata); return 0; } -static int tunnel_socket_read (CONNECTION * conn, char *buf, size_t len) +static int tunnel_socket_read (CONNECTION * conn, char *buf, ssize_t len) { TUNNEL_DATA *tunnel = (TUNNEL_DATA *) conn->sockdata; int rc; @@ -150,7 +145,7 @@ static int tunnel_socket_read (CONNECTION * conn, char *buf, size_t len) } static int tunnel_socket_write (CONNECTION * conn, const char *buf, - size_t len) + ssize_t len) { TUNNEL_DATA *tunnel = (TUNNEL_DATA *) conn->sockdata; int rc;