[Pcsclite-cvs-commit] r2384 - trunk/PCSC/src
Ludovic Rousseau
rousseau at alioth.debian.org
Mon Feb 5 14:47:52 CET 2007
Author: rousseau
Date: 2007-02-05 14:47:51 +0100 (Mon, 05 Feb 2007)
New Revision: 2384
Modified:
trunk/PCSC/src/winscard.c
Log:
SCardDisconnect(): call SYS_USleep() to "allow the status thread to
convey information" only if the application requests SCARD_RESET_CARD or
SCARD_UNPOWER_CARD.
We do not wait if the application requests SCARD_LEAVE_CARD.
Modified: trunk/PCSC/src/winscard.c
===================================================================
--- trunk/PCSC/src/winscard.c 2007-02-05 13:36:50 UTC (rev 2383)
+++ trunk/PCSC/src/winscard.c 2007-02-05 13:47:51 UTC (rev 2384)
@@ -895,6 +895,10 @@
else
Log1(PCSC_LOG_ERROR, "Error resetting card.");
+ /*
+ * Allow the status thread to convey information
+ */
+ SYS_USleep(PCSCLITE_STATUS_POLL_RATE + 10);
}
else if (dwDisposition == SCARD_EJECT_CARD)
{
@@ -960,11 +964,6 @@
if (rContext->dwContexts < 0)
rContext->dwContexts = 0;
- /*
- * Allow the status thread to convey information
- */
- SYS_USleep(PCSCLITE_STATUS_POLL_RATE + 10);
-
return SCARD_S_SUCCESS;
}
More information about the Pcsclite-cvs-commit
mailing list