[Pcsclite-cvs-commit] r5402 - /trunk/PCSC/src/winscard.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Nov 16 15:56:59 UTC 2010
Author: rousseau
Date: Tue Nov 16 15:56:51 2010
New Revision: 5402
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5402
Log:
SCardDisconnect(): change powerState to POWER_STATE_GRACE_PERIOD only if
the previous state was POWER_STATE_INUSE
If the powerState was POWER_STATE_UNPOWERED then do NOT change to
POWER_STATE_GRACE_PERIOD. POWER_STATE_GRACE_PERIOD indicates that the
card is powered on. That is the case if mode is SCARD_SHARE_DIRECT at
SCardConnect()
Modified:
trunk/PCSC/src/winscard.c
Modified: trunk/PCSC/src/winscard.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard.c?rev=5402&op=diff
==============================================================================
--- trunk/PCSC/src/winscard.c (original)
+++ trunk/PCSC/src/winscard.c Tue Nov 16 15:56:51 2010
@@ -956,12 +956,15 @@
RESPONSECODE (*fct)(DWORD) = NULL;
DWORD dwGetSize;
+ if (POWER_STATE_INUSE == rContext->powerState)
+ {
#ifdef DISABLE_AUTO_POWER_ON
- if (SCARD_RESET_CARD == dwDisposition)
+ if (SCARD_RESET_CARD == dwDisposition)
+ rContext->powerState = POWER_STATE_GRACE_PERIOD;
+#else
rContext->powerState = POWER_STATE_GRACE_PERIOD;
-#else
- rContext->powerState = POWER_STATE_GRACE_PERIOD;
#endif
+ }
/* ask to stop the "polling" thread so it can be restarted using
* the correct timeout */
More information about the Pcsclite-cvs-commit
mailing list