From 0ed183b572db48d0091f9c6ee5e3e005a382c66a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 8 Jun 2010 11:21:48 -0400 Subject: [PATCH] [GDBusConnection] Use Gio's default async implementation again The fix was committed in git. https://bugzilla.gnome.org/show_bug.cgi?id=620990 --- gio/gdbusconnection.c | 46 +------------------------------------------ 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c index 79c178be5..786e55124 100644 --- a/gio/gdbusconnection.c +++ b/gio/gdbusconnection.c @@ -1881,54 +1881,10 @@ initable_iface_init (GInitableIface *initable_iface) /* ---------------------------------------------------------------------------------------------------- */ -static void -async_init_thread (GSimpleAsyncResult *res, - GObject *object, - GCancellable *cancellable) -{ - GError *error = NULL; - - if (!g_initable_init (G_INITABLE (object), cancellable, &error)) - { - g_simple_async_result_set_from_error (res, error); - g_error_free (error); - } -} - -static void -async_initable_init_async (GAsyncInitable *initable, - gint io_priority, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - GSimpleAsyncResult *res; - - g_return_if_fail (G_IS_INITABLE (initable)); - - res = g_simple_async_result_new (G_OBJECT (initable), callback, user_data, - async_initable_init_async); - g_simple_async_result_run_in_thread (res, async_init_thread, - io_priority, cancellable); - g_object_unref (res); -} - -static gboolean -async_initable_init_finish (GAsyncInitable *initable, - GAsyncResult *res, - GError **error) -{ - return TRUE; /* Errors handled by base impl */ -} - static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface) { - /* We basically just want to use GIO's default implementation - though that one is - * unfortunately broken, see #615111. So we copy-paste a fixed-up version. - */ - async_initable_iface->init_async = async_initable_init_async; - async_initable_iface->init_finish = async_initable_init_finish; + /* Use default */ } /* ---------------------------------------------------------------------------------------------------- */