GDBus: make use of reliable async cancellation

Call g_simple_async_result_set_check_cancellable() after all
GSimpleAsyncResult creation in order to take advantage of the new
reliable cancellation feature.

The guarantee of reliable cancellation fixes a bug in dbusmenu (which
was already assuming that cancellation was reliable).  See this bug:
https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/953562

https://bugzilla.gnome.org/show_bug.cgi?id=672013

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
Ryan Lortie
2012-03-13 16:41:57 -04:00
committed by David Zeuthen
parent 1c42b6b092
commit e3c7fdd7a4
4 changed files with 10 additions and 0 deletions

View File

@@ -856,6 +856,7 @@ g_dbus_address_get_stream (const gchar *address,
callback,
user_data,
g_dbus_address_get_stream);
g_simple_async_result_set_check_cancellable (res, cancellable);
data = g_new0 (GetStreamData, 1);
data->address = g_strdup (address);
g_simple_async_result_set_op_res_gpointer (res,