On 22/09/05, Najam Siddiqui <[EMAIL PROTECTED]> wrote: > Hi, Hello,
> There seems to be an issue with SCardGetStatusChange on reader insertion, > this is critical with e-gate, we did a simple fix for it, where, > SCardGetStatusChange keeps a count of the number of readers attached to the > system and returns if > > . The reader count changed. Thanks for the patch. I changed it to avoid using a global variable. > The patch addresses 2 issues. > > 1. A sleep is added to avoid a starvation problem in multithreaded > environment. (This was posted on the web by Damien Sauveron. > http://lists.drizzle.com/pipermail/muscle/2004-May/002041.html) Why do you need this change? Use two contexts if you have two threads. Or show me a sample code that demonstrate the bug. > 2. Fix to make SCardGetStatusChange to return on reader > insertion/removal, this is critical for e-gates, because pcscd sees e-gate > insertion/removal as a reader insertion/removal. The function returns > SCARD_S_SUCCESS for this case so that existing application are not broken. Good idea. I can now set a very long timeout in pcsc_scan [1] and it still detect reader insertion. Thanks, [1] http://ludovic.rousseau.free.fr/softwares/pcsc-tools/ -- Dr. Ludovic Rousseau For private mail use [EMAIL PROTECTED] and not "big brother" Google _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
