On 12/19/08, Chaskiel M Grundman <c...@andrew.cmu.edu> wrote: > > I would like also to make the openct stop polling for readers if > > possible (CCID supports this). > > > I assume you mean "stop polling for CARDS".
Via the reader... :) > the ccid spec supports using an interrupt pipe message to notify the host > of card insert/remove events, but devices are not required to implement > that part. Even for devices that do, I don't understand enough of how usb > and libusb handle interrupt endpoints to know if the messages are buffered > indefinitely, or only when there's an outstanding urb. In any case, there > is no asynchronous notification of the insert/remove events, so openct > would still have to poll the ifd to get the data. If you just don't want > to provide the card insert status to clients, then ccid's feature is > irrelevant > I've looked at the code, and I succeeded in understanding how to detect the card in/card out event using the poll loop in ccid_card_status(). I thought to make the blocking poll() at ct_mainloop() call a new method that may return event file descriptor from the reader driver and wait on these. If a command from a client received then a command is sent and get_status is initiated again. Then we need to modify the OpenCT client API to support notification... And make OpenSC PKCS#11 stop poll... But we need to start from the lowlevel implementation. I believe It would be much easier to do this if the interface of OpenCT would relay on sockets. Am I missing something? Alon. The problem is that the infrastructure of OpenCT does not allow waiting for event from the sockets. _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel