summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-05-18 18:02:42 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-05-18 18:02:42 +0200
commitb09102cba2b07d76bbe9026bbab316e8978a6dae (patch)
treed8c6d5dde37a6d07c2cf91dc7454327fe9827b13
parent1976f829e02d3c9a663dac47b26e11de8c979080 (diff)
TpChannel: use tp_client_factory_upgrade_contacts_async()
-rw-r--r--telepathy-glib/channel.c16
1 files 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
{