From 8af1b60afdad95f569279528ff96dda9d1d4e9f8 Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 28 Oct 2010 13:33:50 +0000 Subject: [PATCH] PC/SC: temporarily disable blocking C_WaitForSlotEvent until a checked version for pcsc-lite 1.5.3-1.6.4 exists. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4835 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/pkcs11/pkcs11-global.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pkcs11/pkcs11-global.c b/src/pkcs11/pkcs11-global.c index c9c10aa1..37a8c8b5 100644 --- a/src/pkcs11/pkcs11-global.c +++ b/src/pkcs11/pkcs11-global.c @@ -597,8 +597,9 @@ CK_RV C_WaitForSlotEvent(CK_FLAGS flags, /* blocking/nonblocking flag */ return CKR_ARGUMENTS_BAD; sc_debug(context, SC_LOG_DEBUG_NORMAL, "C_WaitForSlotEvent(block=%d)", !(flags & CKF_DONT_BLOCK)); -#if 0 - /* pcsc-lite does not implement it in a threaded way */ +#ifndef PCSC_CANCEL_OK + /* Not all pcsc-lite versions implement consistently used functions as they are */ + /* FIXME: add proper checking into build to check correct pcsc-lite version for SCardStatusChange/SCardCancel */ if (!(flags & CKF_DONT_BLOCK)) return CKR_FUNCTION_NOT_SUPPORTED; #endif