[Telepathy-commits] [telepathy-glib/master] TpContactsMixin: spec compliance: always return TP_IFACE_CONNECTION info even if not asked for

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Oct 31 10:14:30 PDT 2008


Reported by murrayc on IRC; tested by tests/dbus/contacts-mixin.c
---
 telepathy-glib/contacts-mixin.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/telepathy-glib/contacts-mixin.c b/telepathy-glib/contacts-mixin.c
index 2ba1102..e5205d0 100644
--- a/telepathy-glib/contacts-mixin.c
+++ b/telepathy-glib/contacts-mixin.c
@@ -278,6 +278,7 @@ tp_contacts_mixin_get_contact_attributes (
   TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn,
         TP_HANDLE_TYPE_CONTACT);
   GArray *valid_handles;
+  TpContactsMixinFillContactAttributesFunc func;
 
   TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
 
@@ -323,9 +324,13 @@ tp_contacts_mixin_get_contact_attributes (
    */
   tp_handles_ref (contact_repo, valid_handles);
 
+  func = g_hash_table_lookup (self->priv->interfaces, TP_IFACE_CONNECTION);
+
+  if (func != NULL)
+    func (G_OBJECT (iface), valid_handles, result);
+
   for (i = 0; interfaces[i] != NULL; i++)
     {
-      TpContactsMixinFillContactAttributesFunc func;
 
       func = g_hash_table_lookup (self->priv->interfaces, interfaces[i]);
 
-- 
1.5.6.5



More information about the Telepathy-commits mailing list