aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog10
-rw-r--r--camel/camel-service.c4
-rw-r--r--camel/providers/pop3/camel-pop3-store.c6
3 files changed, 17 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index beb29aaf57..25fc1a75bc 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,13 @@
+2000-12-01 Dan Winship <danw@helixcode.com>
+
+ * camel-service.c (camel_service_disconnect): Don't
+ g_return_if_fail if the service is already disconnected. Just
+ return.
+
+ * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
+ Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
+ (pop3_connect): If we don't succeed, disconnect.
+
2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c
diff --git a/camel/camel-service.c b/camel/camel-service.c
index ee2a5b5431..0fcb61fa52 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -259,7 +259,9 @@ camel_service_disconnect (CamelService *service, gboolean clean,
{
gboolean res;
- g_return_val_if_fail (service->connected, FALSE);
+ if (!service->connected)
+ return TRUE;
+
res = CSERV_CLASS (service)->disconnect (service, clean, ex);
service->connected = FALSE;
return res;
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index bdcf7996e3..2f23bf0bb2 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -449,7 +449,7 @@ pop3_try_authenticate (CamelService *service, gboolean kpop,
}
g_free (msg);
- return camel_exception_is_set (ex);
+ return status == CAMEL_POP3_ERR;
}
static gboolean
@@ -515,8 +515,10 @@ pop3_connect (CamelService *service, CamelException *ex)
g_free (errbuf);
} while (tryagain);
- if (camel_exception_is_set (ex))
+ if (camel_exception_is_set (ex)) {
+ camel_service_disconnect (service, TRUE, ex);
return FALSE;
+ }
return TRUE;
}