[Pcsclite-cvs-commit] r5478 - /trunk/PCSC/src/winscard_svc.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Jan 4 14:25:04 UTC 2011


Author: rousseau
Date: Tue Jan  4 14:25:03 2011
New Revision: 5478

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5478
Log:
ContextThread(): in command CMD_GET_READERS_STATE, wait until all the
readers are ready (ATR available) before sending the reader states.

The problem arrives when you connect two readers at the same time (and
one of them is slow to get the ATR). SCardGetStatusChange() must not
exit with one reader in state READER_NOT_INITIALIZED (as implemented in
revision 5217)

Modified:
    trunk/PCSC/src/winscard_svc.c

Modified: trunk/PCSC/src/winscard_svc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_svc.c?rev=5478&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_svc.c (original)
+++ trunk/PCSC/src/winscard_svc.c Tue Jan  4 14:25:03 2011
@@ -351,6 +351,9 @@
 			{
 				/* nothing to read */
 
+				/* wait until all readers are ready */
+				RFWaitForReaderInit();
+
 				/* dump the readers state */
 				ret = MessageSend(readerStates, sizeof(readerStates), filedes);
 			}




More information about the Pcsclite-cvs-commit mailing list