aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-10-25 20:04:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-10-25 20:06:13 +0800
commit9cd422b3ce4bd658ba47583ed76acddbe02b2e3a (patch)
tree07733ff1a5525bb676627eb1a33b29ba1f20d925
parent7dfa0fa18c911265d0fa95493920abca84ad9ee0 (diff)
downloadgsoc2013-evolution-9cd422b3ce4bd658ba47583ed76acddbe02b2e3a.tar
gsoc2013-evolution-9cd422b3ce4bd658ba47583ed76acddbe02b2e3a.tar.gz
gsoc2013-evolution-9cd422b3ce4bd658ba47583ed76acddbe02b2e3a.tar.bz2
gsoc2013-evolution-9cd422b3ce4bd658ba47583ed76acddbe02b2e3a.tar.lz
gsoc2013-evolution-9cd422b3ce4bd658ba47583ed76acddbe02b2e3a.tar.xz
gsoc2013-evolution-9cd422b3ce4bd658ba47583ed76acddbe02b2e3a.tar.zst
gsoc2013-evolution-9cd422b3ce4bd658ba47583ed76acddbe02b2e3a.zip
Bug 686813 - ECaldavChooser: Deadlock on cancellation
(cherry picked from commit e7981244a68c9d0b6b93d8c2697569668098b647)
-rw-r--r--modules/cal-config-caldav/e-caldav-chooser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/cal-config-caldav/e-caldav-chooser.c b/modules/cal-config-caldav/e-caldav-chooser.c
index b4c51a94bc..30aa8fffd5 100644
--- a/modules/cal-config-caldav/e-caldav-chooser.c
+++ b/modules/cal-config-caldav/e-caldav-chooser.c
@@ -940,9 +940,14 @@ caldav_chooser_calendar_home_set_cb (SoupSession *session,
doc = caldav_chooser_parse_xml (message, "multistatus", &error);
+ /* If we were cancelled then we're in a GCancellable::cancelled
+ * signal handler right now and GCancellable has its mutex locked,
+ * which means calling g_cancellable_disconnect() now will deadlock
+ * when it too tries to acquire the mutex. So defer the GAsyncResult
+ * completion to an idle callback to avoid this deadlock. */
if (error != NULL) {
g_simple_async_result_set_from_error (simple, error);
- g_simple_async_result_complete (simple);
+ g_simple_async_result_complete_in_idle (simple);
g_object_unref (simple);
g_error_free (error);
return;