I think that the version 3 of the ifdhandler may have a function that will have the same job as IFDHGetCapabilities but in a thread safe way.
This thread-safety will be required by PC/SC Lite.
Why we need this?
Imagine that we have 2 identicals readers. One is already connected and the second will be connected in the following process.
Actually the simplified process when we plug the second hotplug reader to PC/SC is:
- Find a free spot in the list of readers for adding the data regarding the reader.
- Search if an other reader using the same ifdhandler exist.
- if yes ask to the ifdhandler of the first reader connected to PC/SC if it supports multiple channels (IFDHGetCapabilities with the tag TAG_IFD_SIMULTANEOUS_ACCESS)
Here, there is a problem of this process due to the mutex on calls to the functions regarding the first reader. Indeed imagine that the first reader has send a command to a smart card and that the process on the smart card spend a long time (this call have set the mutex). If the second reader is plugged in this laps because the mutex is set, on the call IFDHGetCapabilities it must wait a long time that the mutex is unset. After many time it will be completly detected by PC/SC.
There may be the same problem for all the calls of IFDHGetCapabilities coded by me to support the access simultaneous to slots or identical readers.
It is not a critical problem, because this is just a waiting, but if we want used the reader in an efficient way, it may be better.
This function XXXX may concern the ifdhandler itself and its features and the function IFDHGetCapabilities may concern only the capabilities of a card/slot.
I wait some comments.
Regards,
Damien Sauveron
_______________________________________________ Muscle mailing list [EMAIL PROTECTED] http://lists.musclecard.com/mailman/listinfo/muscle
