[Pcsclite-cvs-commit] CVS PCSC/src

CVS User rousseau ludovic.rousseau@free.fr
Wed, 02 Mar 2005 08:11:25 -0700


Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv5829

Modified Files:
	winscard_clnt.c 
Log Message:
SCardGetStatusChange(): if the card is present but not yet powered up
we give some time to the status thread to do his job


--- /cvsroot/pcsclite/PCSC/src/winscard_clnt.c	2005/02/22 14:40:26	1.52
+++ /cvsroot/pcsclite/PCSC/src/winscard_clnt.c	2005/03/02 15:11:22	1.53
@@ -9,7 +9,7 @@
  *  Damien Sauveron <damien.sauveron@labri.fr>
  *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
- * $Id: winscard_clnt.c,v 1.52 2005/02/22 14:40:26 rousseau Exp $
+ * $Id: winscard_clnt.c,v 1.53 2005/03/02 15:11:22 rousseau Exp $
  */
 
 #include "config.h"
@@ -1254,6 +1254,11 @@
 
 				if (dwState & SCARD_PRESENT)
 				{
+					/* card present but not yet powered up */
+					if (0 == rContext->cardAtrLength)
+						/* Allow the status thread to convey information */
+						SYS_USleep(PCSCLITE_STATUS_POLL_RATE + 10);
+
 					currReader->cbAtr = rContext->cardAtrLength;
 					memcpy(currReader->rgbAtr, rContext->cardAtr,
 						currReader->cbAtr);