Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/caps.c @ 2216:fa516ef22145
caps: Specifiy the function to free the "features" hash values
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 05 Nov 2015 20:58:57 +0100 |
parents | 778280b01bcb |
children | 79e12dacbccd |
comparison
equal
deleted
inserted
replaced
2215:ba1a770dd632 | 2216:fa516ef22145 |
---|---|
96 void caps_add(const char *hash) | 96 void caps_add(const char *hash) |
97 { | 97 { |
98 if (!hash) | 98 if (!hash) |
99 return; | 99 return; |
100 caps *c = g_new0(caps, 1); | 100 caps *c = g_new0(caps, 1); |
101 c->features = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); | 101 c->features = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); |
102 c->identities = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, identity_destroy); | 102 c->identities = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, identity_destroy); |
103 c->forms = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, form_destroy); | 103 c->forms = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, form_destroy); |
104 g_hash_table_replace(caps_cache, g_strdup(hash), c); | 104 g_hash_table_replace(caps_cache, g_strdup(hash), c); |
105 } | 105 } |
106 | 106 |