projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99841a0
)
silc_hash_table_find_foreach interface change.
author
Pekka Riikonen
<priikone@silcnet.org>
Wed, 9 Oct 2002 16:52:51 +0000
(16:52 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Wed, 9 Oct 2002 16:52:51 +0000
(16:52 +0000)
lib/silccore/silcidcache.c
patch
|
blob
|
history
diff --git
a/lib/silccore/silcidcache.c
b/lib/silccore/silcidcache.c
index a23d6aca8f565cb77678c15f2ab0761587f8f3b1..44afd47bd566ca97b88fe06fea5272a83986bba2 100644
(file)
--- a/
lib/silccore/silcidcache.c
+++ b/
lib/silccore/silcidcache.c
@@
-305,6
+305,9
@@
static void silc_idcache_purge_foreach(void *key, void *context,
SilcUInt32 curtime = time(NULL);
SilcIDCacheEntry c = (SilcIDCacheEntry)context;
+ if (!context)
+ return;
+
if (c->expire && c->expire < curtime) {
/* Remove the entry from the hash tables */
if (c->name)
@@
-373,6
+376,8
@@
static void silc_idcache_get_all_foreach(void *key, void *context,
void *user_context)
{
SilcIDCacheList list = (SilcIDCacheList)user_context;
+ if (!context)
+ return;
silc_idcache_list_add(list, (SilcIDCacheEntry)context);
}