Merge commit 'origin/silc.1.1.branch'
[silc.git] / lib / silcapputil / silcidcache.c
index a6d8c26edeb7e4a49ad77917f76deb19c8f1e185..f549b770b4a3a007efb24e3a02a1af4c090eb6e5 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2000 - 2007 Pekka Riikonen
+  Copyright (C) 2000 - 2008 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -78,15 +78,15 @@ SilcIDCache silc_idcache_alloc(SilcUInt32 count, SilcIdType id_type,
   if (!cache)
     return NULL;
 
-  cache->id_table = silc_hash_table_alloc(count, silc_hash_id,
+  cache->id_table = silc_hash_table_alloc(NULL, count, silc_hash_id,
                                          SILC_32_TO_PTR(id_type),
                                          silc_hash_id_compare,
                                          SILC_32_TO_PTR(id_type),
                                          NULL, NULL, TRUE);
-  cache->name_table = silc_hash_table_alloc(count, silc_hash_utf8_string, NULL,
-                                           silc_hash_utf8_compare, NULL,
+  cache->name_table = silc_hash_table_alloc(NULL, count, silc_hash_utf8_string,
+                                           NULL, silc_hash_utf8_compare, NULL,
                                            NULL, NULL, TRUE);
-  cache->context_table = silc_hash_table_alloc(count, silc_hash_ptr, NULL,
+  cache->context_table = silc_hash_table_alloc(NULL, count, silc_hash_ptr, NULL,
                                               NULL, NULL, NULL, NULL, TRUE);
   cache->destructor = destructor;
   cache->context = destructor_context;
@@ -142,9 +142,8 @@ silc_idcache_add(SilcIDCache cache, char *name, void *id, void *context)
   if (id) {
     /* See if this entry is added already to cache */
     if (silc_idcache_find_by_id_one(cache, id, NULL)) {
-      SILC_LOG_ERROR(("Attempted to add same ID twice to ID Cache, id %s",
+      SILC_LOG_DEBUG(("Attempted to add same ID twice to ID Cache, id %s",
                      silc_id_render(id, cache->id_type)));
-      SILC_ASSERT(FALSE);
       goto err;
     }
   }