On 25/12/06, Martin Preuss <[EMAIL PROTECTED]> wrote:
After looking at your driver again I added handling code for some tags, especially TAG_IFD_SIMULTANEOUS_ACCESS, TAG_IFD_THREAD_SAFE, TAG_IFD_SLOTS_NUMBER and TAG_IFD_SLOT_THREAD_SAFE (BTW: I also added handling of your new tags for IFD version and vendor name).
Exact. You have to support TAG_IFD_SIMULTANEOUS_ACCESS if your driver can work with more than one reader.
While this solves my problems the handling of defaults by the pcsc daemon seems a little bit odd to me: I guess the daemon should under no circumstances call the same driver with an already in-use LUN for different readers, because there is no useful way for the driver to react but rejecting such a request (because in susequent request like IFDHICCPresence the driver could not determine the destination reader for the request).
Exact. And my CCID driver did not check this case. It now correctly reject the second request with a reused Lun (SVN revision 2280). The problem is that a process cannot load the same library two times. The second dlopen(3) works but the library is not reloaded; the first instance of the library is reused instead. So if your driver does support only one reader at a time you cannot support two readers by loading the driver two times. I now have two options: a. reject the second reader without asking the driver b. calling the driver with a different Lun and see what happens Option a is safe. But option b would have worked for your Reiner SCT Cyberjack driver. I decided to use option a and make pcscd log the error as: readerfactory.c:652:RFSetReaderName() Driver foobar does not support more than 1 reader(s). Maybe the driver should support TAG_IFD_SIMULTANEOUS_ACCESS Committed in SVN revision 2281 and 2282.
Anyway, thanks for your help (and your clean driver which always serves as a reference implementation and which also helped me a lot while developing my own projects).
You're welcome. And thanks for you bug report. pcscd-lite is now improved. Bye, -- Dr. Ludovic Rousseau _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
