[Pcsclite-cvs-commit] CVS PCSC/src
CVS User rousseau
ludovic.rousseau@free.fr
Thu, 02 Dec 2004 12:18:43 -0700
Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv31141
Modified Files:
winscard_clnt.c
Log Message:
CardGetStatusChange(): do not sleep at each reader check but only once
per cycle. Before the change the total sleep time was
cReaders * PCSCLITE_STATUS_WAIT
Thanks to Oivind H. Danielsen for the three patches
--- /cvsroot/pcsclite/PCSC/src/winscard_clnt.c 2004/12/02 19:08:47 1.48
+++ /cvsroot/pcsclite/PCSC/src/winscard_clnt.c 2004/12/02 19:18:43 1.49
@@ -9,7 +9,7 @@
* Damien Sauveron <damien.sauveron@labri.fr>
* Ludovic Rousseau <ludovic.rousseau@free.fr>
*
- * $Id: winscard_clnt.c,v 1.48 2004/12/02 19:08:47 rousseau Exp $
+ * $Id: winscard_clnt.c,v 1.49 2004/12/02 19:18:43 rousseau Exp $
*/
#include "config.h"
@@ -1438,7 +1438,14 @@
SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
return SCARD_E_TIMEOUT;
}
+ }
+ /*
+ * Only sleep once for each cycle of reader checks.
+ */
+ if (j == 0)
+ {
+ SYS_USleep(PCSCLITE_STATUS_WAIT);
dwTime += PCSCLITE_STATUS_WAIT;
}
}