diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-07-28 23:30:46 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-08-24 19:49:29 +0100 |
commit | 885cec575b94377bddd49f77bbee4c8e8f99a117 (patch) | |
tree | d0b1d27772e4bcb2dc2428f12b56521a67aab697 /src/caps-hash.c | |
parent | 3c9e76aea2b1b7edafe200550b9c8baf3a5936dd (diff) |
Calculate caps hashes from gabble_presence_get_caps()
Originally by Will Thompson, with some merging and corrections.
Regressions:
* capabilities for specific services in stream and D-Bus tube stopped
working
Diffstat (limited to 'src/caps-hash.c')
-rw-r--r-- | src/caps-hash.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/caps-hash.c b/src/caps-hash.c index c51fa0345..21d96f129 100644 --- a/src/caps-hash.c +++ b/src/caps-hash.c @@ -359,20 +359,10 @@ gchar * caps_hash_compute_from_self_presence (GabbleConnection *self) { GabblePresence *presence = self->self_presence; - GSList *features_list = capabilities_get_features (presence->caps, - presence->per_channel_manager_caps); - GPtrArray *features = g_ptr_array_new (); + GPtrArray *features = gabble_presence_get_caps (presence); GPtrArray *identities = g_ptr_array_new (); GPtrArray *dataforms = g_ptr_array_new (); gchar *str; - GSList *i; - - /* get our features list */ - for (i = features_list; NULL != i; i = i->next) - { - const Feature *feat = (const Feature *) i->data; - g_ptr_array_add (features, g_strdup (feat->ns)); - } /* XEP-0030 requires at least 1 identity. We don't need more. */ g_ptr_array_add (identities, g_strdup ("client/pc//" PACKAGE_STRING)); @@ -382,7 +372,6 @@ caps_hash_compute_from_self_presence (GabbleConnection *self) str = caps_hash_compute (features, identities, dataforms); gabble_presence_free_xep0115_hash (features, identities, dataforms); - g_slist_free (features_list); return str; } |