From 6545e80191916bea8705e0d4feb0e00192b36905 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 14 Feb 2003 20:11:53 +0000 Subject: Same as the gpg and pkcs7 contexts. 2003-02-14 Jeffrey Stedfast * camel-smime-context.c (smime_get_password): Same as the gpg and pkcs7 contexts. * camel-sasl-popb4smtp.c (popb4smtp_challenge): Updated for camel_session_get_password(). * camel-pkcs7-context.c (get_password): Same as the gpg code. * camel-gpg-context.c (gpg_ctx_parse_status): Updated for camel_session_get_password(). * providers/smtp/camel-smtp-transport.c (smtp_connect): No need to set USER_CANCEL exception here as it is done by camel_session_get_password(). Also updated for the new get_password() API change. * providers/imap/camel-imap-store.c (imap_auth_loop): Updated for camel_session_get_password() changes. We don't need to play the "bad passwd" game here too, do we? Bah, probably should but I don't feel like it for now. Maybe when we rewrite the IMAP provider. * camel-session.c (camel_session_get_password): Now takes a 'reprompt' argument that will force user-input to be given even if we have the passwd cached. * providers/pop3/camel-pop3-store.c (pop3_connect): Instead of uncaching the passwd after we receive a -ERR from the POP server, set 'reprompt' to TRUE to force user-input for the next password prompt (ie, make sure the front-end knows not to just return the cached value). The front-end can then decide to fill-in the user-input field with the last passwd that the user supplied. (pop3_try_authenticate): Now takes a reprompt argument which we pass into camel_session_get_password(). svn path=/trunk/; revision=19912 --- camel/providers/smtp/camel-smtp-transport.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'camel/providers/smtp') diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index bb27c632bc..6361dcd7a8 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -499,7 +499,7 @@ smtp_connect (CamelService *service, CamelException *ex) while (!authenticated) { if (errbuf) { /* We need to un-cache the password before prompting again */ - camel_session_forget_password (session, service, "password", ex); + camel_session_forget_password (session, service, "password", NULL); g_free (service->url->passwd); service->url->passwd = NULL; } @@ -511,7 +511,7 @@ smtp_connect (CamelService *service, CamelException *ex) errbuf ? errbuf : "", service->url->user, service->url->host); - service->url->passwd = camel_session_get_password (session, prompt, TRUE, + service->url->passwd = camel_session_get_password (session, prompt, FALSE, TRUE, service, "password", ex); g_free (prompt); @@ -519,8 +519,6 @@ smtp_connect (CamelService *service, CamelException *ex) errbuf = NULL; if (!service->url->passwd) { - camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, - _("You didn't enter a password.")); camel_service_disconnect (service, TRUE, NULL); return FALSE; } -- cgit v1.2.3