From 0a12cd8b6ba0acaf48fb9d452136238e81948057 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 27 Mar 2001 05:30:41 +0000 Subject: add an argument to say whether or not you want "PLAIN" in the list (so you * camel-sasl.c (camel_sasl_authtype_list): add an argument to say whether or not you want "PLAIN" in the list (so you don't end up with "Password" twice in the config dialog). * providers/imap/camel-imap-provider.c (camel_provider_module_init): * providers/imap/camel-imap-store.c (query_auth_types): We don't want PLAIN. * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): * providers/smtp/camel-smtp-transport.c (query_auth_types): But we do. svn path=/trunk/; revision=8972 --- camel/camel-sasl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'camel/camel-sasl.c') diff --git a/camel/camel-sasl.c b/camel/camel-sasl.c index 978104de90..f97e42480b 100644 --- a/camel/camel-sasl.c +++ b/camel/camel-sasl.c @@ -201,25 +201,23 @@ camel_sasl_new (const char *service_name, const char *mechanism, CamelService *s /** * camel_sasl_authtype_list: + * @include_plain: whether or not to include the PLAIN mechanism * * Return value: a GList of SASL-supported authtypes. The caller must * free the list, but not the contents. **/ GList * -camel_sasl_authtype_list (void) +camel_sasl_authtype_list (gboolean include_plain) { GList *types = NULL; - /* We don't do PLAIN here, because it's considered to be - * normal password authentication, just behind SSL. - */ - types = g_list_prepend (types, &camel_sasl_cram_md5_authtype); types = g_list_prepend (types, &camel_sasl_digest_md5_authtype); #ifdef HAVE_KRB4 types = g_list_prepend (types, &camel_sasl_kerberos4_authtype); #endif - types = g_list_prepend (types, &camel_sasl_plain_authtype); + if (include_plain) + types = g_list_prepend (types, &camel_sasl_plain_authtype); return types; } -- cgit