From: Richard Russon Date: Tue, 16 May 2017 13:18:37 +0000 (+0100) Subject: replace 'SASL_DATA' with 'struct SaslData' X-Git-Tag: neomutt-20170526~21^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd13bfc8cbdd799c0782a2e1ee60086c50f6aaf5;p=neomutt replace 'SASL_DATA' with 'struct SaslData' --- diff --git a/mutt_sasl.c b/mutt_sasl.c index a8cba96a8..a0df24686 100644 --- a/mutt_sasl.c +++ b/mutt_sasl.c @@ -386,10 +386,10 @@ int mutt_sasl_interact(sasl_interact_t *interaction) * is successful, using mutt_sasl_setup_conn */ static int mutt_sasl_conn_open(struct Connection *conn) { - SASL_DATA *sasldata = NULL; + struct SaslData *sasldata = NULL; int rc; - sasldata = (SASL_DATA *) conn->sockdata; + sasldata = (struct SaslData *) conn->sockdata; conn->sockdata = sasldata->sockdata; rc = (sasldata->msasl_open)(conn); conn->sockdata = sasldata; @@ -401,10 +401,10 @@ static int mutt_sasl_conn_open(struct Connection *conn) * the sasl_conn_t object, then restores connection to pre-sasl state */ static int mutt_sasl_conn_close(struct Connection *conn) { - SASL_DATA *sasldata = NULL; + struct SaslData *sasldata = NULL; int rc; - sasldata = (SASL_DATA *) conn->sockdata; + sasldata = (struct SaslData *) conn->sockdata; /* restore connection's underlying methods */ conn->sockdata = sasldata->sockdata; @@ -426,12 +426,12 @@ static int mutt_sasl_conn_close(struct Connection *conn) static int mutt_sasl_conn_read(struct Connection *conn, char *buf, size_t len) { - SASL_DATA *sasldata = NULL; + struct SaslData *sasldata = NULL; int rc; unsigned int olen; - sasldata = (SASL_DATA *) conn->sockdata; + sasldata = (struct SaslData *) conn->sockdata; /* if we still have data in our read buffer, copy it into buf */ if (sasldata->blen > sasldata->bpos) @@ -487,13 +487,13 @@ out: static int mutt_sasl_conn_write(struct Connection *conn, const char *buf, size_t len) { - SASL_DATA *sasldata = NULL; + struct SaslData *sasldata = NULL; int rc; const char *pbuf = NULL; unsigned int olen, plen; - sasldata = (SASL_DATA *) conn->sockdata; + sasldata = (struct SaslData *) conn->sockdata; conn->sockdata = sasldata->sockdata; /* encode data, if necessary */ @@ -534,7 +534,7 @@ fail: static int mutt_sasl_conn_poll(struct Connection *conn) { - SASL_DATA *sasldata = conn->sockdata; + struct SaslData *sasldata = conn->sockdata; int rc; conn->sockdata = sasldata->sockdata; @@ -561,7 +561,7 @@ static int mutt_sasl_conn_poll(struct Connection *conn) * for the read/write methods. */ void mutt_sasl_setup_conn(struct Connection *conn, sasl_conn_t *saslconn) { - SASL_DATA *sasldata = safe_malloc(sizeof(SASL_DATA)); + struct SaslData *sasldata = safe_malloc(sizeof(struct SaslData)); /* work around sasl_getprop aliasing issues */ const void *tmp = NULL; diff --git a/mutt_sasl.h b/mutt_sasl.h index 2b32dcdca..2afc89744 100644 --- a/mutt_sasl.h +++ b/mutt_sasl.h @@ -29,7 +29,7 @@ int mutt_sasl_interact(sasl_interact_t *interaction); void mutt_sasl_setup_conn(struct Connection *conn, sasl_conn_t *saslconn); void mutt_sasl_done(void); -typedef struct +struct SaslData { sasl_conn_t *saslconn; const sasl_ssf_t *ssf; @@ -47,6 +47,6 @@ typedef struct int (*msasl_read)(struct Connection *conn, char *buf, size_t len); int (*msasl_write)(struct Connection *conn, const char *buf, size_t count); int (*msasl_poll)(struct Connection *conn); -} SASL_DATA; +}; #endif /* _MUTT_SASL_H */