[evolution-ews] Bug #681544 - Crash on failed autodiscovery



commit f23e714e925d24282e58134e4345dc8dd1891c67
Author: Milan Crha <mcrha redhat com>
Date:   Fri Aug 10 09:07:26 2012 +0200

    Bug #681544 - Crash on failed autodiscovery

 src/server/e-ews-connection.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index aa46f28..3099c57 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -1962,7 +1962,14 @@ failed:
 
 exit:
 	g_simple_async_result_complete_in_idle (simple);
-	g_object_unref (simple);
+
+	/* This function is processed within e_ews_soup_thread() and the 'simple'
+	   holds reference to EEwsConnection. For cases when this is the last
+	   reference to 'simple' the unref would cause crash, because of g_thread_join()
+	   in connection's dispose, trying to wait on the end of itself, thus it's
+	   safer to unref the 'simple' in a dedicated thread.
+	*/
+	ews_unref_in_thread (simple);
 }
 
 static void post_restarted (SoupMessage *msg, gpointer data)



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