From: Pekka Riikonen Date: Sat, 13 Dec 2008 19:48:04 +0000 (+0200) Subject: ID Cache: Fixed destructor callback calling. X-Git-Tag: silc.toolkit.1.1.9~8 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=069e1969a3c2593056ecd1221e7df8bd52ede13f ID Cache: Fixed destructor callback calling. The destructor context given to the ID cache destructor callback was wrong which caused odd crashes. --- diff --git a/lib/silcapputil/silcidcache.c b/lib/silcapputil/silcidcache.c index 831970d5..e2a7d8bb 100644 --- a/lib/silcapputil/silcidcache.c +++ b/lib/silcapputil/silcidcache.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - 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 @@ -55,7 +55,7 @@ static void silc_idcache_destructor(SilcIDCache cache, void *app_context) { if (cache->destructor) - cache->destructor(cache, entry, cache->destructor, app_context); + cache->destructor(cache, entry, cache->context, app_context); memset(entry, 'F', sizeof(*entry)); silc_free(entry); diff --git a/lib/silcapputil/silcidcache.h b/lib/silcapputil/silcidcache.h index 7d8e1427..c3f48276 100644 --- a/lib/silcapputil/silcidcache.h +++ b/lib/silcapputil/silcidcache.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - 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 @@ -185,7 +185,8 @@ SilcBool silc_idcache_del_by_id(SilcIDCache cache, void *id, * * SYNOPSIS * - * SilcBool silc_idcache_del_by_context(SilcIDCache cache, void *context); + * SilcBool silc_idcache_del_by_context(SilcIDCache cache, void *context, + * void *app_context); * * DESCRIPTION *