telepathy-glib: TpConnection: remove check for CONTACTS interface when preparing roster

Xavier Claessens xclaesse at kemper.freedesktop.org
Mon Jun 4 03:57:00 PDT 2012


Module: telepathy-glib
Branch: master
Commit: 7aeafd996d5623a781e564f3ae3d485a6ee3a202
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=7aeafd996d5623a781e564f3ae3d485a6ee3a202

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Fri Jun  1 17:17:42 2012 +0200

TpConnection: remove check for CONTACTS interface when preparing roster

In tp_connection_list_features() it is already said that CONTACTS iface
is required to prepare CONTACT_LIST feature. So the extra check is
useless.

https://bugs.freedesktop.org/show_bug.cgi?id=49373

---

 telepathy-glib/connection-contact-list.c |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/telepathy-glib/connection-contact-list.c b/telepathy-glib/connection-contact-list.c
index d48a481..f406089 100644
--- a/telepathy-glib/connection-contact-list.c
+++ b/telepathy-glib/connection-contact-list.c
@@ -226,7 +226,6 @@ got_contact_list_attributes_cb (TpConnection *self,
     GObject *weak_object)
 {
   GSimpleAsyncResult *result = (GSimpleAsyncResult *) weak_object;
-  /* may be NULL if error != NULL, when calling directly */
   GArray *features = user_data;
   GHashTableIter iter;
   gpointer key, value;
@@ -301,19 +300,6 @@ prepare_roster (TpConnection *self,
   DEBUG ("CM has the roster for connection %s, fetch it now.",
       tp_proxy_get_object_path (self));
 
-  /* Pre-empt _tp_contacts_bind_to_signals, which assumes that Contacts
-   * is present and works correctly */
-  if (!tp_proxy_has_interface_by_id (self,
-        TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS))
-    {
-      GError error = { TP_DBUS_ERRORS, TP_DBUS_ERROR_NO_INTERFACE,
-          "Obsolete CM does not have the Contacts interface" };
-
-      got_contact_list_attributes_cb (self, NULL, &error, NULL,
-          (GObject *) result);
-      return;
-    }
-
   tp_cli_connection_interface_contact_list_connect_to_contacts_changed_with_id (
       self, contacts_changed_cb, NULL, NULL, NULL, NULL);
 



More information about the telepathy-commits mailing list