From 8156095b46adc8466d470775168a622a957bff19 Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 28 Oct 2010 09:44:22 +0000 Subject: [PATCH] FIXME: Don't issue SCardCancel unless the environment is known not to hang (part 1) git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4833 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/pkcs11/pkcs11-global.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pkcs11/pkcs11-global.c b/src/pkcs11/pkcs11-global.c index 808e3001..c9c10aa1 100644 --- a/src/pkcs11/pkcs11-global.c +++ b/src/pkcs11/pkcs11-global.c @@ -291,8 +291,9 @@ CK_RV C_Finalize(CK_VOID_PTR pReserved) /* cancel pending calls */ in_finalize = 1; +#ifdef PCSC_CANCEL_OK sc_cancel(context); - +#endif /* remove all cards from readers */ for (i=0; i < (int)sc_ctx_get_reader_count(context); i++) card_removed(sc_ctx_get_reader(context, i));