From b09102cba2b07d76bbe9026bbab316e8978a6dae Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 18 May 2012 18:02:42 +0200 Subject: TpChannel: use tp_client_factory_upgrade_contacts_async() --- telepathy-glib/channel.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c index 4ff2e675f..ee6ded9a8 100644 --- a/telepathy-glib/channel.c +++ b/telepathy-glib/channel.c @@ -757,11 +757,12 @@ upgrade_contacts_cb (GObject *object, GAsyncResult *result, gpointer user_data) { + TpClientFactory *factory = (TpClientFactory *) object; TpChannel *self = user_data; - TpConnection *connection = (TpConnection *) object; GError *error = NULL; - if (!tp_connection_upgrade_contacts_finish (connection, result, NULL, &error)) + if (!tp_client_factory_upgrade_contacts_finish (factory, result, NULL, + &error)) { _tp_channel_abort_introspection (self, "Upgrading contacts failed", error); @@ -830,18 +831,11 @@ _tp_channel_create_contacts (TpChannel *self) /* Prepare initiator and target contacts */ if (contacts->len > 0) { - GArray *features; - - features = tp_client_factory_dup_contact_features ( + tp_client_factory_upgrade_contacts_async ( tp_proxy_get_factory (self->priv->connection), - self->priv->connection); - - tp_connection_upgrade_contacts_async (self->priv->connection, + self->priv->connection, contacts->len, (TpContact **) contacts->pdata, - (GQuark *) features->data, upgrade_contacts_cb, g_object_ref (self)); - - g_array_unref (features); } else { -- cgit v1.2.3