X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_sasl.c;h=d904164d1fa16220bb741f47e468216f3bcac50f;hp=15f8c0ee5298a8f499084f08378ea61fb204acff;hb=4282401a0bcdc285a228da4ad635cbf7baf71488;hpb=7f7a0be369840b290248e5b0302beb447fa1b3cd diff --git a/mutt_sasl.c b/mutt_sasl.c index 15f8c0e..d904164 100644 --- a/mutt_sasl.c +++ b/mutt_sasl.c @@ -13,22 +13,20 @@ # include "config.h" #endif -#include - -#include "mutt.h" -#include "account.h" -#include "mutt_sasl.h" -#include "mutt_socket.h" - -#include "lib/debug.h" - #include #include #include - #include #include +#include +#include + +#include "mutt.h" +#include "account.h" +#include "mutt_sasl.h" +#include + static int getnameinfo_err (int ret) { int err; @@ -93,9 +91,9 @@ static int mutt_sasl_cb_pass (sasl_conn_t * conn, void *context, int id, /* socket wrappers for a SASL security layer */ static int mutt_sasl_conn_open (CONNECTION * conn); static int mutt_sasl_conn_close (CONNECTION * conn); -static int mutt_sasl_conn_read (CONNECTION * conn, char *buf, size_t len); +static int mutt_sasl_conn_read (CONNECTION * conn, char *buf, ssize_t len); static int mutt_sasl_conn_write (CONNECTION * conn, const char *buf, - size_t count); + ssize_t count); /* utility function, stolen from sasl2 sample code */ static int iptostring (const struct sockaddr *addr, socklen_t addrlen, @@ -257,7 +255,7 @@ int mutt_sasl_client_new (CONNECTION * conn, sasl_conn_t ** saslconn) * just fall back to LOGIN in the IMAP case anyway. If that doesn't * work for POP, we can make it a flag or move this code into * imap/auth_sasl.c */ - memset (&secprops, 0, sizeof (secprops)); + p_clear(&secprops, 1); /* Work around a casting bug in the SASL krb4 module */ secprops.max_ssf = 0x7fff; secprops.maxbufsize = M_SASL_MAXBUF; @@ -502,7 +500,7 @@ static int mutt_sasl_conn_close (CONNECTION * conn) return rc; } -static int mutt_sasl_conn_read (CONNECTION * conn, char *buf, size_t len) +static int mutt_sasl_conn_read (CONNECTION * conn, char *buf, ssize_t len) { SASL_DATA *sasldata; int rc; @@ -564,7 +562,7 @@ out: } static int mutt_sasl_conn_write (CONNECTION * conn, const char *buf, - size_t len) + ssize_t len) { SASL_DATA *sasldata; int rc;