From 8f07d4c6ac7ffd3bff80d608058a7e7ba4554583 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 9 May 2002 08:23:20 +0000 Subject: Instead of testing for SERVICE_CONNECTED, we need to also handle 2002-05-09 Not Zed * 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. svn path=/trunk/; revision=16730 --- camel/camel-service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'camel/camel-service.c') 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) { -- cgit v1.2.3