From 7edf4916019dd2535be5b08fce63d579001577d6 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 13 Mar 2001 17:47:02 +0000 Subject: When trying again after a failed password attempt, check if the connection * providers/imap/camel-imap-store.c (imap_connect): When trying again after a failed password attempt, check if the connection got dropped (which Courier will do) and deal accordingly. svn path=/trunk/; revision=8675 --- camel/providers/imap/camel-imap-store.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'camel/providers') diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index ec65d499b3..c13a584a33 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -464,6 +464,14 @@ imap_connect (CamelService *service, CamelException *ex) } } + if (!store->connected) { + /* Some servers (eg, courier) will disconnect on + * a bad password. So reconnect here. + */ + if (!connect_to_server (service, ex)) + return NULL; + } + if (authtype) authenticated = try_auth (store, authtype->authproto, ex); else { -- cgit v1.2.3