diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-03-02 19:11:21 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-03-05 12:33:24 +0000 |
commit | 38b6331ab00d96f81f9eeedeb28a14395f2ff1cb (patch) | |
tree | 26bfd2abb58dc6f3923576a9d011651a27797010 /examples/client | |
parent | ad90e68c7c7ede1a7849151169eea8faddcd1a04 (diff) |
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 <simon.mcvittie@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'examples/client')
-rw-r--r-- | 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 05b8b6a51..9272a7755 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 */ |