[Pcsclite-cvs-commit] r2548 - trunk/PCSC/src
rousseau at alioth.debian.org
rousseau at alioth.debian.org
Thu May 24 08:54:41 UTC 2007
Author: rousseau
Date: 2007-05-24 08:54:41 +0000 (Thu, 24 May 2007)
New Revision: 2548
Modified:
trunk/PCSC/src/winscard.c
Log:
SCardConnect()/SCardDisconnect(): the reader may be removed while we are
waiting after a lock. fix a crash of pcscd
Modified: trunk/PCSC/src/winscard.c
===================================================================
--- trunk/PCSC/src/winscard.c 2007-05-23 16:44:04 UTC (rev 2547)
+++ trunk/PCSC/src/winscard.c 2007-05-24 08:54:41 UTC (rev 2548)
@@ -341,6 +341,10 @@
SYS_USleep(PCSCLITE_STATUS_POLL_RATE + 10);
}
+ /* the reader has been removed while we were waiting */
+ if (NULL == rContext->readerState)
+ return SCARD_E_NO_SMARTCARD;
+
/*******************************************
*
* This section tries to determine the
@@ -830,6 +834,10 @@
Log1(PCSC_LOG_INFO, "Lock released");
}
+ /* the reader has been removed while we were waiting */
+ if (NULL == rContext->readerState)
+ return SCARD_E_NO_SMARTCARD;
+
/*
* Unlock any blocks on this context
*/
More information about the Pcsclite-cvs-commit
mailing list