[Pcsclite-cvs-commit] r2545 - trunk/PCSC/src

rousseau at alioth.debian.org rousseau at alioth.debian.org
Wed May 23 14:27:12 UTC 2007


Author: rousseau
Date: 2007-05-23 14:27:12 +0000 (Wed, 23 May 2007)
New Revision: 2545

Modified:
   trunk/PCSC/src/winscard.c
Log:
SCardDisconnect(): do not block if dwDisposition == SCARD_LEAVE_CARD.

We block only for SCARD_UNPOWER_CARD, SCARD_RESET_CARD and
SCARD_EJECT_CARD since that would impact other running transactions


Modified: trunk/PCSC/src/winscard.c
===================================================================
--- trunk/PCSC/src/winscard.c	2007-05-23 14:19:45 UTC (rev 2544)
+++ trunk/PCSC/src/winscard.c	2007-05-23 14:27:12 UTC (rev 2545)
@@ -821,7 +821,8 @@
 	/*
 	 * wait until a possible transaction is finished
 	 */
-	if ((rContext->dwLockId != 0) && (rContext->dwLockId != hCard))
+	if ((dwDisposition != SCARD_LEAVE_CARD) && (rContext->dwLockId != 0)
+		&& (rContext->dwLockId != hCard))
 	{
 		Log1(PCSC_LOG_INFO, "Waiting for release of lock");
 		while (rContext->dwLockId != 0)




More information about the Pcsclite-cvs-commit mailing list