aboutsummaryrefslogtreecommitdiffstats
path: root/modules/cal-config-caldav
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:04:19 +0800
commite7981244a68c9d0b6b93d8c2697569668098b647 (patch)
tree687e4f9e1fa97960addcc7432d7ca4f2099358c7 /modules/cal-config-caldav
parent67f230c63bdb627d987bcfedaf67e18332bbbf84 (diff)
downloadgsoc2013-evolution-e7981244a68c9d0b6b93d8c2697569668098b647.tar
gsoc2013-evolution-e7981244a68c9d0b6b93d8c2697569668098b647.tar.gz
gsoc2013-evolution-e7981244a68c9d0b6b93d8c2697569668098b647.tar.bz2
gsoc2013-evolution-e7981244a68c9d0b6b93d8c2697569668098b647.tar.lz
gsoc2013-evolution-e7981244a68c9d0b6b93d8c2697569668098b647.tar.xz
gsoc2013-evolution-e7981244a68c9d0b6b93d8c2697569668098b647.tar.zst
gsoc2013-evolution-e7981244a68c9d0b6b93d8c2697569668098b647.zip
Bug 686813 - ECaldavChooser: Deadlock on cancellation
Diffstat (limited to 'modules/cal-config-caldav')
-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;