summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-02-12 20:09:40 +0000
committerCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-02-12 20:09:40 +0000
commit25b99da0587b48d6a326e85d34d9522b8f5d2748 (patch)
treecc29abf468ba078bdb3e8c3ba7cb2135e25ac2df
parent2125b532a0263206a54c6bbb46e2382c4651b851 (diff)
using g_hash_table_replace
-rw-r--r--telepathy-logger/observer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/telepathy-logger/observer.c b/telepathy-logger/observer.c
index cdb4495a3..560aafb88 100644
--- a/telepathy-logger/observer.c
+++ b/telepathy-logger/observer.c
@@ -534,12 +534,13 @@ tpl_observer_register_channel (TplObserver *self,
if (g_hash_table_lookup (glob_map, key) != NULL)
{
DEBUG ("Channel path found, replacing %s", key);
- g_hash_table_remove (glob_map, key);
+ g_hash_table_replace (glob_map, key, channel);
}
else
+ {
DEBUG ("Channel path not found, registering %s", key);
-
- g_hash_table_insert (glob_map, key, channel);
+ g_hash_table_insert (glob_map, key, channel);
+ }
g_object_notify (G_OBJECT (self), "registered-channels");
g_object_unref (channel);