From a14ff781ebf231daa99990fd65c2312f26db93a8 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 19 Feb 2013 13:51:32 +0100 Subject: Manage C_CloseAllSessions function for multiple callers Make C_CloseAllSessions work for different callers. Track the sessions that each caller opens and close just those when C_CloseAllSessiosn is called. --- p11-kit/tests/test-init.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'p11-kit/tests/test-init.c') diff --git a/p11-kit/tests/test-init.c b/p11-kit/tests/test-init.c index f2347c8..dbeab46 100644 --- a/p11-kit/tests/test-init.c +++ b/p11-kit/tests/test-init.c @@ -152,7 +152,14 @@ test_recursive_initialization (CuTest *tc) p11_unlock (); rv = p11_kit_module_initialize (recursive_managed); - CuAssertTrue (tc, rv == CKR_FUNCTION_FAILED); + CuAssertIntEquals (tc, CKR_FUNCTION_FAILED, rv); + + p11_lock (); + + rv = p11_module_release_inlock_reentrant (recursive_managed); + CuAssertTrue (tc, rv == CKR_OK); + + p11_unlock (); p11_kit_be_loud (); } -- cgit v1.1