From 714a2c567a1fe21bda347954dc0b9b3a8db7a977 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 2 Mar 2012 19:11:21 +0000 Subject: [PATCH 1/7] Don't use tp_channel_call_when_ready, except in its regression tests Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45842 Signed-off-by: Simon McVittie --- examples/client/inspect-channel.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/client/inspect-channel.c b/examples/client/inspect-channel.c index 05b8b6a..9272a77 100644 --- a/examples/client/inspect-channel.c +++ b/examples/client/inspect-channel.c @@ -22,20 +22,23 @@ typedef struct { } InspectChannelData; static void -channel_ready_cb (TpChannel *channel, - const GError *error, +channel_ready_cb (GObject *source, + GAsyncResult *result, gpointer user_data) { + TpChannel *channel = TP_CHANNEL (source); InspectChannelData *data = user_data; guint handle_type, handle; gchar *channel_type; gchar **interfaces, **iter; + GError *error = NULL; - if (error != NULL) + if (!tp_proxy_prepare_finish (channel, result, &error)) { g_warning ("%s", error->message); data->exit_status = 1; g_main_loop_quit (data->main_loop); + g_clear_error (&error); return; } @@ -108,7 +111,7 @@ connection_ready_cb (TpConnection *connection, return; } - tp_channel_call_when_ready (channel, channel_ready_cb, data); + tp_proxy_prepare_async (channel, NULL, channel_ready_cb, user_data); /* the channel will remain referenced as long as it has calls pending on * it */ -- 1.7.9.1