From c5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9 Mon Sep 17 00:00:00 2001 From: Romain Francoise Date: Tue, 15 Apr 2014 19:34:32 +0200 Subject: Import upstream version 5.1.3 --- src/libcharon/plugins/ha/Makefile.in | 1 - src/libcharon/plugins/ha/ha_cache.c | 18 +----------------- 2 files changed, 1 insertion(+), 18 deletions(-) (limited to 'src/libcharon/plugins/ha') diff --git a/src/libcharon/plugins/ha/Makefile.in b/src/libcharon/plugins/ha/Makefile.in index 2f3263064..d7a77ee17 100644 --- a/src/libcharon/plugins/ha/Makefile.in +++ b/src/libcharon/plugins/ha/Makefile.in @@ -373,7 +373,6 @@ nm_LIBS = @nm_LIBS@ nm_ca_dir = @nm_ca_dir@ nm_plugins = @nm_plugins@ oldincludedir = @oldincludedir@ -openac_plugins = @openac_plugins@ pcsclite_CFLAGS = @pcsclite_CFLAGS@ pcsclite_LIBS = @pcsclite_LIBS@ pdfdir = @pdfdir@ diff --git a/src/libcharon/plugins/ha/ha_cache.c b/src/libcharon/plugins/ha/ha_cache.c index ce1afe6f9..60e75fc7e 100644 --- a/src/libcharon/plugins/ha/ha_cache.c +++ b/src/libcharon/plugins/ha/ha_cache.c @@ -58,22 +58,6 @@ struct private_ha_cache_t { mutex_t *mutex; }; -/** - * Hashtable hash function - */ -static u_int hash(void *key) -{ - return (uintptr_t)key; -} - -/** - * Hashtable equals function - */ -static bool equals(void *a, void *b) -{ - return a == b; -} - /** * Cache entry for an IKE_SA */ @@ -380,7 +364,7 @@ ha_cache_t *ha_cache_create(ha_kernel_t *kernel, ha_socket_t *socket, .count = count, .kernel = kernel, .socket = socket, - .cache = hashtable_create(hash, equals, 8), + .cache = hashtable_create(hashtable_hash_ptr, hashtable_equals_ptr, 8), .mutex = mutex_create(MUTEX_TYPE_DEFAULT), ); -- cgit v1.2.3