Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/caps.c @ 1877:c30fa2baf387
Correctly process missing name in identity
author | Myhailo Danylenko <isbear@ukrpost.net> |
---|---|
date | Tue, 06 Apr 2010 00:16:02 +0300 |
parents | 1f5015ef43e8 |
children | 51f032d5ca22 |
comparison
equal
deleted
inserted
replaced
1873:1f5015ef43e8 | 1877:c30fa2baf387 |
---|---|
146 caps *old_caps; | 146 caps *old_caps; |
147 caps *c = g_hash_table_lookup(caps_cache, ""); | 147 caps *c = g_hash_table_lookup(caps_cache, ""); |
148 | 148 |
149 g_hash_table_steal(caps_cache, ""); | 149 g_hash_table_steal(caps_cache, ""); |
150 sha1 = g_checksum_new(G_CHECKSUM_SHA1); | 150 sha1 = g_checksum_new(G_CHECKSUM_SHA1); |
151 identity = g_strdup_printf("%s/%s//%s<", c->category, c->type, c->name); | 151 identity = g_strdup_printf("%s/%s//%s<", c->category, c->type, |
152 c->name ? c->name : ""); | |
152 g_checksum_update(sha1, (guchar*)identity, -1); | 153 g_checksum_update(sha1, (guchar*)identity, -1); |
153 g_free(identity); | 154 g_free(identity); |
154 | 155 |
155 features = g_hash_table_get_values(c->features); | 156 features = g_hash_table_get_values(c->features); |
156 features = g_list_sort(features, _strcmp_sort); | 157 features = g_list_sort(features, _strcmp_sort); |