Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/caps.c @ 1645:d3cd4db23f55
Fix for double-inserted features
author | Myhailo Danylenko <isbear@ukrpost.net> |
---|---|
date | Tue, 03 Nov 2009 12:51:14 +0200 |
parents | c5ee395fbc8c |
children | 63ebb1d32c7d |
comparison
equal
deleted
inserted
replaced
1644:73fc85ea0b4b | 1645:d3cd4db23f55 |
---|---|
92 if (!hash) | 92 if (!hash) |
93 return; | 93 return; |
94 c = g_hash_table_lookup(caps_cache, hash); | 94 c = g_hash_table_lookup(caps_cache, hash); |
95 if (c) { | 95 if (c) { |
96 char *f = g_strdup(feature); | 96 char *f = g_strdup(feature); |
97 g_hash_table_insert(c->features, f, f); | 97 g_hash_table_replace(c->features, f, f); |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 int caps_has_feature(char *hash, char *feature) | 101 int caps_has_feature(char *hash, char *feature) |
102 { | 102 { |