aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/camel-service.c3
-rw-r--r--camel/providers/imap/camel-imap-store.c2
3 files changed, 12 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 3f01082fac..fd92c1be87 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,12 @@
+2002-05-09 Not Zed <NotZed@Ximian.com>
+
+ * camel-service.c (camel_service_disconnect): Instead of testing
+ for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING
+ too, as it will often have setup some details before it failed.
+ Make it !DISCONNECTED (and !DISCONNECTING for recursive calls,
+ which happen). Fixes #23782, and maybe also #21604 and many other
+ random crashes.
+
2002-05-08 Jeffrey Stedfast <fejj@ximian.com>
* camel-digest-store.c (digest_setv): Implemented.
diff --git a/camel/camel-service.c b/camel/camel-service.c
index f83c3fe612..c704852a7c 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -430,7 +430,8 @@ camel_service_disconnect (CamelService *service, gboolean clean,
CAMEL_SERVICE_LOCK (service, connect_lock);
- if (service->status == CAMEL_SERVICE_CONNECTED) {
+ if (service->status != CAMEL_SERVICE_DISCONNECTED
+ && service->status != CAMEL_SERVICE_DISCONNECTING) {
CAMEL_SERVICE_LOCK (service, connect_op_lock);
service->connect_op = camel_operation_registered ();
if (!service->connect_op) {
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 316ab6980e..629223d935 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -863,7 +863,7 @@ imap_disconnect_online (CamelService *service, gboolean clean, CamelException *e
{
CamelImapStore *store = CAMEL_IMAP_STORE (service);
CamelImapResponse *response;
-
+
if (store->connected && clean) {
response = camel_imap_command (store, NULL, ex, "LOGOUT");
camel_imap_response_free (store, response);