aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-12-02 01:32:42 +0800
committerDan Winship <danw@src.gnome.org>2000-12-02 01:32:42 +0800
commitdfee15e65ac56a20ae8841ed8410ba8ee9a505ca (patch)
treeaa2e3153c43232557e5d6e04a4df89111bf25c9b /camel
parent4008cef734d96607948f029dddf47f9311adfb8d (diff)
downloadgsoc2013-evolution-dfee15e65ac56a20ae8841ed8410ba8ee9a505ca.tar
gsoc2013-evolution-dfee15e65ac56a20ae8841ed8410ba8ee9a505ca.tar.gz
gsoc2013-evolution-dfee15e65ac56a20ae8841ed8410ba8ee9a505ca.tar.bz2
gsoc2013-evolution-dfee15e65ac56a20ae8841ed8410ba8ee9a505ca.tar.lz
gsoc2013-evolution-dfee15e65ac56a20ae8841ed8410ba8ee9a505ca.tar.xz
gsoc2013-evolution-dfee15e65ac56a20ae8841ed8410ba8ee9a505ca.tar.zst
gsoc2013-evolution-dfee15e65ac56a20ae8841ed8410ba8ee9a505ca.zip
Don't g_return_if_fail if the service is already disconnected. Just
* 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. svn path=/trunk/; revision=6756
Diffstat (limited to 'camel')
-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;
}