[evolution-ews/gnome-3-6] Bug #686268 - Crash under oal_response_cb()



commit b8c7cf3d8b4fb6ec644e2bdd770d00e5241aacda
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 17 12:27:42 2012 +0200

    Bug #686268 - Crash under oal_response_cb()

 src/server/e-ews-connection.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 487e971..09140a1 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -2324,6 +2324,7 @@ parse_oal_full_details (xmlNode *node,
 	return elements;
 }
 
+/* this is run in cnc->priv->soup_thread */
 static void
 oal_response_cb (SoupSession *soup_session,
                  SoupMessage *soup_message,
@@ -2398,7 +2399,11 @@ oal_response_cb (SoupSession *soup_session,
 
 exit:
 	g_simple_async_result_complete_in_idle (simple);
-	g_object_unref (simple);
+	/* This is run in cnc->priv->soup_thread, and the cnc is held by simple, thus
+	   for cases when the complete_in_idle is finished before the unref call, when
+	   the cnc will be left with the last reference and thus cannot join the soup_thread
+	   while still in it, the unref is done in a dedicated thread. */
+	ews_unref_in_thread (simple);
 }
 
 static void



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