[evolution-data-server] Bug #630321 - Disabling IMAPX account produces runtime warnings



commit bd971e9b5c547dcf40cff09cc2055ccaed08a5d7
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 29 12:02:54 2010 +0200

    Bug #630321 - Disabling IMAPX account produces runtime warnings

 camel/providers/imapx/camel-imapx-server.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index ec1e572..83d1c46 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -4872,9 +4872,10 @@ imapx_parser_thread (gpointer d)
 
 	g_clear_error (&local_error);
 
+	QUEUE_LOCK (is);
 	g_object_unref (cancellable);
+	QUEUE_UNLOCK (is);
 
-	is->parser_thread = NULL;
 	is->parser_quit = FALSE;
 
 	g_signal_emit (is, signals[SHUTDOWN], 0);
@@ -4920,7 +4921,6 @@ imapx_server_dispose (GObject *object)
 
 	QUEUE_LOCK (server);
 	server->state = IMAPX_SHUTDOWN;
-	QUEUE_UNLOCK (server);
 
 	server->parser_quit = TRUE;
 
@@ -4929,9 +4929,12 @@ imapx_server_dispose (GObject *object)
 		g_object_unref (server->cancellable);
 		server->cancellable = NULL;
 	}
+	QUEUE_UNLOCK (server);
 
-	if (server->parser_thread)
+	if (server->parser_thread) {
 		g_thread_join (server->parser_thread);
+		server->parser_thread = NULL;
+	}
 
 	if (server->cinfo && imapx_idle_supported (server))
 		imapx_exit_idle (server);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]