evolution-data-server r9628 - branches/gnome-2-22/camel/providers/smtp



Author: fejj
Date: Tue Sep 30 16:38:33 2008
New Revision: 9628
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9628&view=rev

Log:
2008-09-30  Jeffrey Stedfast  <fejj novell com>

	* camel-smtp-transport.c (smtp_connect): If auth fails,we need to
	update the password_flags to include the REPROMPT bit flag.



Modified:
   branches/gnome-2-22/camel/providers/smtp/ChangeLog
   branches/gnome-2-22/camel/providers/smtp/camel-smtp-transport.c

Modified: branches/gnome-2-22/camel/providers/smtp/camel-smtp-transport.c
==============================================================================
--- branches/gnome-2-22/camel/providers/smtp/camel-smtp-transport.c	(original)
+++ branches/gnome-2-22/camel/providers/smtp/camel-smtp-transport.c	Tue Sep 30 16:38:33 2008
@@ -487,6 +487,7 @@
 		CamelSession *session = camel_service_get_session (service);
 		CamelServiceAuthType *authtype;
 		gboolean authenticated = FALSE;
+		guint32 password_flags;
 		char *errbuf = NULL;
 
 		if (!g_hash_table_lookup (transport->authtypes, service->url->authmech)) {
@@ -516,12 +517,15 @@
 				return FALSE;
 			}
 		}
-
+		
+		password_flags = CAMEL_SESSION_PASSWORD_SECRET;
+		
 		/* keep trying to login until either we succeed or the user cancels */
 		while (!authenticated) {
 			if (errbuf) {
 				/* We need to un-cache the password before prompting again */
 				camel_session_forget_password (session, service, NULL, "password", NULL);
+				password_flags |= CAMEL_SESSION_PASSWORD_REPROMPT;
 				g_free (service->url->passwd);
 				service->url->passwd = NULL;
 			}
@@ -540,7 +544,7 @@
 
 				service->url->passwd = camel_session_get_password (
 					session, service, NULL, full_prompt,
-					"password", CAMEL_SESSION_PASSWORD_SECRET, ex);
+					"password", password_flags, ex);
 
 				g_free (base_prompt);
 				g_free (full_prompt);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]