gdbus: fix deadlock on message cancel/timeout
authorDan Winship <danw@gnome.org>
Mon, 6 Apr 2015 14:09:04 +0000 (10:09 -0400)
committerDan Winship <danw@gnome.org>
Mon, 6 Apr 2015 16:22:07 +0000 (12:22 -0400)
commit7e8d4145af745e6ac51337ffcc65872791e7299f
tree23fe8721afd75e129de24bafee1e32cdd385439f
parent95d300eac58e6e6a7d57ce50896a7c656ebe78cf
gdbus: fix deadlock on message cancel/timeout

The gdbus GTask port introduced a deadlock because some code had been
using g_simple_async_result_complete_in_idle() to ensure that the
callback didn't run until after a mutex was unlocked, but in the gtask
version, the callback was being run immediately. Fix it to drop the
mutex before calling g_task_return*(). Also, tweak
tests/gdbus-connection to test this.

https://bugzilla.gnome.org/show_bug.cgi?id=747349
gio/gdbusconnection.c
gio/tests/gdbus-connection.c