X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Fauth.c;h=143fde0ac5d5e320652361d6a2b49091aad6af35;hp=6f000add8c57c229f65ee2ea6f6b16fb93e6c982;hb=1ee89902de184a640c171ae3285bff6882a791bd;hpb=492434e350e3ca2d3330c2589de3f9485929dab7 diff --git a/imap/auth.c b/imap/auth.c index 6f000ad..143fde0 100644 --- a/imap/auth.c +++ b/imap/auth.c @@ -11,12 +11,7 @@ /* IMAP login/authentication code */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "lib/mem.h" -#include "lib/intl.h" +#include #include "mutt.h" #include "imap_private.h" @@ -37,7 +32,7 @@ static imap_auth_t imap_authenticators[] = { #endif {imap_auth_login, "login"}, - {NULL} + {NULL, NULL} }; /* imap_authenticate: Attempt to authenticate using either user-specified @@ -52,7 +47,7 @@ int imap_authenticate (IMAP_DATA * idata) if (ImapAuthenticators && *ImapAuthenticators) { /* Try user-specified list of authentication methods */ - methods = safe_strdup (ImapAuthenticators); + methods = m_strdup(ImapAuthenticators); for (method = methods; method; method = delim) { delim = strchr (method, ':'); @@ -61,8 +56,6 @@ int imap_authenticate (IMAP_DATA * idata) if (!method[0]) continue; - dprint (2, - (debugfile, "imap_authenticate: Trying method %s\n", method)); authenticator = imap_authenticators; while (authenticator->authenticate) { @@ -70,7 +63,7 @@ int imap_authenticate (IMAP_DATA * idata) !ascii_strcasecmp (authenticator->method, method)) if ((r = authenticator->authenticate (idata, method)) != IMAP_AUTH_UNAVAIL) { - FREE (&methods); + p_delete(&methods); return r; } @@ -78,12 +71,10 @@ int imap_authenticate (IMAP_DATA * idata) } } - FREE (&methods); + p_delete(&methods); } else { /* Fall back to default: any authenticator */ - dprint (2, - (debugfile, "imap_authenticate: Using any available method.\n")); authenticator = imap_authenticators; while (authenticator->authenticate) {