From 5f815bed62c038a52281a9a8cece855cb8fb6741 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 24 Jul 2012 15:28:00 +0200 Subject: [PATCH] tp_connection_upgrade_contacts(): Use special trick of ready_enough_for_contacts TpConnection itself wants to prepare TpContacts before being officially CONNECTED. This was already the case for self contact. Use the same trick for blocked contacts. https://bugs.freedesktop.org/show_bug.cgi?id=52441 --- telepathy-glib/contact.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c index abdc0a1..2827dec 100644 --- a/telepathy-glib/contact.c +++ b/telepathy-glib/contact.c @@ -4186,7 +4186,7 @@ tp_connection_get_contacts_by_handle (TpConnection *self, /* As an implementation detail, this method actually starts working slightly * before we're officially ready. We use this to get the TpContact for the - * SelfHandle. */ + * Connection. */ g_return_if_fail (self->priv->ready_enough_for_contacts); g_return_if_fail (tp_proxy_get_invalidated (self) == NULL); @@ -4308,8 +4308,10 @@ tp_connection_upgrade_contacts (TpConnection *self, ContactsContext *context; guint i; - g_return_if_fail (tp_proxy_is_prepared (self, - TP_CONNECTION_FEATURE_CONNECTED)); + /* As an implementation detail, this method actually starts working slightly + * before we're officially ready. We use this to get the TpContact for the + * Connection. */ + g_return_if_fail (self->priv->ready_enough_for_contacts); g_return_if_fail (n_contacts >= 1); g_return_if_fail (contacts != NULL); g_return_if_fail (n_features == 0 || features != NULL); -- 1.7.10.4