From 912c824230695936999c0c54f02996ffa3b6409c Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Wed, 9 Oct 2002 16:52:51 +0000 Subject: [PATCH] silc_hash_table_find_foreach interface change. --- lib/silccore/silcidcache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/silccore/silcidcache.c b/lib/silccore/silcidcache.c index a23d6aca..44afd47b 100644 --- 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); } -- 2.43.0