diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-07-27 11:24:55 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-07-27 11:24:55 +0200 |
commit | 308a776372eb1560480fbfcb5ef9d918a7a1454f (patch) | |
tree | 97f650f4a829c16ef6146ac95c80a37edf6eca60 /p11-kit/proxy.c | |
parent | 3bb86b72ca5882b1e5684db837c75df810f283c3 (diff) | |
download | p11-kit-308a776372eb1560480fbfcb5ef9d918a7a1454f.tar.gz |
Reimplement and remove apache licensed bits of code.
* Reimplement the various bits of the hash table that were
still based on the apache apr code. Use different algorithms
for hashing, lookup and other stuff.
* Use this as an opportunity to cleanup that code and make
it more legible.
https://bugzilla.redhat.com/show_bug.cgi?id=725905
Diffstat (limited to 'p11-kit/proxy.c')
-rw-r--r-- | p11-kit/proxy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/p11-kit/proxy.c b/p11-kit/proxy.c index 7069f71..c3c7e80 100644 --- a/p11-kit/proxy.c +++ b/p11-kit/proxy.c @@ -35,7 +35,7 @@ #include "config.h" -#include "hash.h" +#include "hashmap.h" #include "pkcs11.h" #include "p11-kit.h" #include "private.h" @@ -78,7 +78,7 @@ static struct _Shared { Mapping *mappings; unsigned int n_mappings; int mappings_refs; - hash_t *sessions; + hashmap *sessions; CK_ULONG last_handle; } gl = { NULL, 0, 0, NULL, FIRST_HANDLE }; @@ -553,14 +553,14 @@ proxy_C_CloseAllSessions (CK_SLOT_ID id) CK_RV rv = CKR_OK; Session *sess; CK_ULONG i, count = 0; - hash_iter_t iter; + hashiter iter; _p11_lock (); if (!gl.sessions) { rv = CKR_CRYPTOKI_NOT_INITIALIZED; } else { - to_close = calloc (sizeof (CK_SESSION_HANDLE), hash_count (gl.sessions)); + to_close = calloc (sizeof (CK_SESSION_HANDLE), hash_size (gl.sessions)); if (!to_close) { rv = CKR_HOST_MEMORY; } else { |