summaryrefslogtreecommitdiff
path: root/src/libcharon/plugins/ha/ha_cache.c
diff options
context:
space:
mode:
authorRomain Francoise <rfrancoise@debian.org>2014-04-15 19:35:31 +0200
committerRomain Francoise <rfrancoise@debian.org>2014-04-15 19:35:31 +0200
commitdf40590dead5696facf9943f46e222a5e831286d (patch)
treed701325b24c0e1c5676fa9cb8ed959254dd4367a /src/libcharon/plugins/ha/ha_cache.c
parent91b54afb0421705a4fb9d990d813007cd45bc2ce (diff)
parentc5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9 (diff)
downloadvyos-strongswan-df40590dead5696facf9943f46e222a5e831286d.tar.gz
vyos-strongswan-df40590dead5696facf9943f46e222a5e831286d.zip
Merge tag 'upstream/5.1.3'
Upstream version 5.1.3 * tag 'upstream/5.1.3': Import upstream version 5.1.3
Diffstat (limited to 'src/libcharon/plugins/ha/ha_cache.c')
-rw-r--r--src/libcharon/plugins/ha/ha_cache.c18
1 files changed, 1 insertions, 17 deletions
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
@@ -59,22 +59,6 @@ struct private_ha_cache_t {
};
/**
- * 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
*/
typedef struct {
@@ -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),
);