From 16d6bd7083b3a77645ffe68fcb49c7cf36e0b9ff Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 4 Oct 2001 18:12:22 +0000 Subject: Unregister the operation before unreffing it. 2001-10-04 Jeffrey Stedfast * camel-service.c (camel_service_connect): Unregister the operation before unreffing it. svn path=/trunk/; revision=13412 --- camel/camel-service.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/camel/camel-service.c b/camel/camel-service.c index fed8945008..befc8d4f69 100644 --- a/camel/camel-service.c +++ b/camel/camel-service.c @@ -230,6 +230,7 @@ gboolean camel_service_connect (CamelService *service, CamelException *ex) { gboolean ret = FALSE; + gboolean unreg = FALSE; g_return_val_if_fail (CAMEL_IS_SERVICE (service), FALSE); g_return_val_if_fail (service->session != NULL, FALSE); @@ -250,6 +251,7 @@ camel_service_connect (CamelService *service, CamelException *ex) if (!service->connect_op) { service->connect_op = camel_operation_new (NULL, NULL); camel_operation_register (service->connect_op); + unreg = TRUE; } CAMEL_SERVICE_UNLOCK (service, connect_op_lock); @@ -258,6 +260,8 @@ camel_service_connect (CamelService *service, CamelException *ex) service->status = ret ? CAMEL_SERVICE_CONNECTED : CAMEL_SERVICE_DISCONNECTED; CAMEL_SERVICE_LOCK (service, connect_op_lock); + if (unreg) + camel_operation_unregister (service->connect_op); camel_operation_unref (service->connect_op); service->connect_op = NULL; CAMEL_SERVICE_UNLOCK (service, connect_op_lock); -- cgit v1.2.3