Hello, It seems that there is an issue in pcsc-lite when using transactions in multiple threads. It is possible to destroy a transaction of another card handle. This was tested with pcsc-lite 1.5.3 and 1.6.1.
See the following pseudo calls (connect to the same smart card): Thread1: - SCardEstablishContext (ctx1) - SCardConnect (hcard1) Thread2: - SCardEstablishContext (ctx2) - SCardConnect (hcard2) - SCardBeginTransaction (hcard2) Thread1: - SCardDisconnect (hcard1, SCARD_LEAVE_CARD) -> returns SCARD_E_SHARING_VIOLATION (this is the first error, there should be no sharing violation when using SCARD_LEAVE_CARD. This works fine on the Windows PCSC) - SCardReleaseContext (ctx1) -> Releases the context. This context owns the card handle hcard1 which could not be disconnected due to the sharing violation. But during cleanup of this handle, it destroys the transaction of hcard2. Thread2: - SCardTransmit (hcard2) -> SCARD_E_SHARING_VIOLATION -> expected would be that this call works Regards, Reinhard Steiner
_______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
