[evolution-data-server] Fix a hang while quitting evo



commit 4ffe045cb60964930d94977c8d210d08c98beb65
Author: Chenthill Palanisamy <pchenthill novell com>
Date:   Mon Feb 1 20:28:00 2010 +0530

    Fix a hang while quitting evo

 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 5b31255..379bdf7 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3108,6 +3108,9 @@ imapx_parser_thread (gpointer d)
 				CAMEL_SERVICE_REC_UNLOCK (is->store, connect_lock);
 
 				cancel_all_jobs (is, &ex);
+				
+				if (imapx_idle_supported (is))
+					imapx_exit_idle (is);
 			}
 
 			if (errno == EINTR)
@@ -3204,9 +3207,6 @@ imapx_disconnect (CamelIMAPXServer *is)
 {
 	gboolean ret = TRUE;
 
-	if (imapx_idle_supported (is))
-		imapx_exit_idle (is);
-
 	if (is->stream) {
 		if (camel_stream_close (is->stream->source) == -1)
 			ret = FALSE;
@@ -3268,6 +3268,9 @@ camel_imapx_server_connect(CamelIMAPXServer *is, gint state)
 	} else {
 		imapx_disconnect (is);
 
+		if (imapx_idle_supported (is))
+			imapx_exit_idle (is);
+
 		pthread_join (is->parser_thread_id, NULL);
 		ret = TRUE;
 	}



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