X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fauth.c;h=4861fbbe9c85c854d0d03890fb92f287ef3e868a;hb=49f1156410e9a037404101696d37b2c0d5c67564;hp=48626f5bfd9bae5571194c3834a61804d6e75de3;hpb=c3e57678c8be193fc137854020f3a90887be97c9;p=apps%2Fmadmutt.git diff --git a/imap/auth.c b/imap/auth.c index 48626f5..4861fbb 100644 --- a/imap/auth.c +++ b/imap/auth.c @@ -15,7 +15,14 @@ # include "config.h" #endif +#include + +#include "lib/mem.h" +#include "lib/intl.h" +#include "lib/debug.h" + #include "mutt.h" +#include "ascii.h" #include "imap_private.h" #include "auth.h" @@ -34,7 +41,7 @@ static imap_auth_t imap_authenticators[] = { #endif {imap_auth_login, "login"}, - {NULL} + {NULL, NULL} }; /* imap_authenticate: Attempt to authenticate using either user-specified @@ -49,7 +56,7 @@ int imap_authenticate (IMAP_DATA * idata) if (ImapAuthenticators && *ImapAuthenticators) { /* Try user-specified list of authentication methods */ - methods = safe_strdup (ImapAuthenticators); + methods = str_dup (ImapAuthenticators); for (method = methods; method; method = delim) { delim = strchr (method, ':'); @@ -58,8 +65,7 @@ int imap_authenticate (IMAP_DATA * idata) if (!method[0]) continue; - dprint (2, - (debugfile, "imap_authenticate: Trying method %s\n", method)); + debug_print (2, ("Trying method %s\n", method)); authenticator = imap_authenticators; while (authenticator->authenticate) { @@ -67,7 +73,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; } @@ -75,12 +81,11 @@ 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")); + debug_print (2, ("Using any available method.\n")); authenticator = imap_authenticators; while (authenticator->authenticate) {