# include "config.h"
#endif
-#include <lib-lib/mem.h>
-
-#include "mutt.h"
-#include "account.h"
-#include "mutt_sasl.h"
-#include "mutt_socket.h"
-
-#include "lib/debug.h"
-
#include <errno.h>
#include <netdb.h>
#include <sasl/sasl.h>
-
#include <sys/socket.h>
#include <netinet/in.h>
+#include <lib-lib/mem.h>
+#include <lib-lib/debug.h>
+
+#include "mutt.h"
+#include "account.h"
+#include "mutt_sasl.h"
+#include <lib-sys/mutt_socket.h>
+
static int getnameinfo_err (int ret)
{
int err;
/* 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,
* 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;
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;
}
static int mutt_sasl_conn_write (CONNECTION * conn, const char *buf,
- size_t len)
+ ssize_t len)
{
SASL_DATA *sasldata;
int rc;