[evolution-patches] 71427, pop doesn't re-prompt for bad password




against head, but for stable, obviuos logic flaw

Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
retrieving revision 1.2392
diff -u -p -r1.2392 ChangeLog
--- camel/ChangeLog	24 Jan 2005 02:59:31 -0000	1.2392
+++ camel/ChangeLog	24 Jan 2005 04:28:48 -0000
@@ -1,5 +1,10 @@
 2005-01-24  Not Zed  <NotZed Ximian com>
 
+	** See bug #71427.
+
+	* providers/pop3/camel-pop3-store.c (pop3_connect): fix the
+	exception case for re-prompting for the password.
+
 	** See bug #71625, and bug #56110.
 
 	* providers/imap/camel-imap-folder.c (get_content): when getting a
Index: camel/providers/pop3/camel-pop3-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/pop3/camel-pop3-store.c,v
retrieving revision 1.120
diff -u -p -r1.120 camel-pop3-store.c
--- camel/providers/pop3/camel-pop3-store.c	3 Dec 2004 18:14:07 -0000	1.120
+++ camel/providers/pop3/camel-pop3-store.c	24 Jan 2005 04:28:48 -0000
@@ -584,20 +584,21 @@ pop3_connect (CamelService *service, Cam
 	if (!connect_to_server_wrapper (service, ex))
 		return FALSE;
 	
-	do {
+	while (1) {
 		status = pop3_try_authenticate (service, reprompt, errbuf, ex);
 		g_free (errbuf);
 		errbuf = NULL;
 		
 		/* we only re-prompt if we failed to authenticate, any other error and we just abort */
-		if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE) {
+		if (status == 0 && camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE) {
 			errbuf = g_strdup_printf ("%s\n\n", camel_exception_get_description (ex));
 			g_free (service->url->passwd);
 			service->url->passwd = NULL;
 			reprompt = TRUE;
 			camel_exception_clear (ex);
-		}
-	} while (status != -1 && ex->id == CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE);
+		} else
+			break;
+	}
 	
 	g_free (errbuf);
 	


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