[Pcsclite-cvs-commit] r3041 - /trunk/PCSC/src/winscard_clnt.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Jul 4 08:53:05 UTC 2008
Author: rousseau
Date: Fri Jul 4 08:53:05 2008
New Revision: 3041
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3041
Log:
SCardGetStatusChange(): return if all readers are SCARD_STATE_IGNORE
Modified:
trunk/PCSC/src/winscard_clnt.c
Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=3041&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Fri Jul 4 08:53:05 2008
@@ -1745,6 +1745,19 @@
if ((rgReaderStates == NULL && cReaders > 0)
|| (cReaders > PCSCLITE_MAX_READERS_CONTEXTS))
return SCARD_E_INVALID_PARAMETER;
+
+ /* return if all readers are SCARD_STATE_IGNORE */
+ if (cReaders > 0)
+ {
+ int nbNonIgnoredReaders = cReaders;
+
+ for (j=0; j<cReaders; j++)
+ if (rgReaderStates[j].dwCurrentState & SCARD_STATE_IGNORE)
+ nbNonIgnoredReaders--;
+
+ if (0 == nbNonIgnoredReaders)
+ return SCARD_S_SUCCESS;
+ }
rv = SCardCheckDaemonAvailability();
if (rv != SCARD_S_SUCCESS)
More information about the Pcsclite-cvs-commit
mailing list