diff options
Diffstat (limited to 'src/connection.c')
-rw-r--r-- | src/connection.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/src/connection.c b/src/connection.c index 660a8dd5..c8d392f3 100644 --- a/src/connection.c +++ b/src/connection.c @@ -3033,11 +3033,10 @@ empty_caps_set (void) return empty; } -/** +/* * gabble_connection_get_handle_contact_capabilities: * - * Returns: a set of channel classes representing @handle's capabilities, or - * %NULL if unknown. + * Returns: an array of channel classes representing @handle's capabilities */ static GPtrArray * gabble_connection_get_handle_contact_capabilities ( @@ -3424,21 +3423,14 @@ conn_contact_capabilities_fill_contact_attributes (GObject *obj, for (i = 0; i < contacts->len; i++) { TpHandle handle = g_array_index (contacts, TpHandle, i); - GPtrArray *array; - - array = gabble_connection_get_handle_contact_capabilities (self, handle); - - if (array != NULL) - { - GValue *val = tp_g_value_slice_new ( - TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST); + GValue *val = tp_g_value_slice_new_take_boxed ( + TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST, + gabble_connection_get_handle_contact_capabilities (self, handle)); - g_value_take_boxed (val, array); - tp_contacts_mixin_set_contact_attribute (attributes_hash, - handle, - TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES"/capabilities", - val); - } + tp_contacts_mixin_set_contact_attribute (attributes_hash, + handle, + TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES"/capabilities", + val); } } @@ -3525,13 +3517,11 @@ gabble_connection_get_contact_capabilities ( for (i = 0; i < handles->len; i++) { - GPtrArray *arr; TpHandle handle = g_array_index (handles, TpHandle, i); + GPtrArray *arr; arr = gabble_connection_get_handle_contact_capabilities (self, handle); - - if (arr != NULL) - g_hash_table_insert (ret, GUINT_TO_POINTER (handle), arr); + g_hash_table_insert (ret, GUINT_TO_POINTER (handle), arr); } tp_svc_connection_interface_contact_capabilities_return_from_get_contact_capabilities |