[Pcsclite-muscle] question about locking and reconnect
Ricardo Martin
rickyepoderi
Wed Jun 3 00:14:25 PDT 2015
Hi,
Sorry for being tiresome but thinking about this issue I think we have only two ways of going:
1.- pcsc-lite changes SCardReconnect to release the locks and perform as windows implementation does. This option changes how the software works right now and can trigger another problems in other projects that depend on it. Besides it wouldn't solve pcsc on mac (I think pcsc on mac forked an older pcsc-lite version, so I suppose it has the same behavior, SCardReconnect does not release the locks).
2.- opensc adds some "ifdef _WIN32" to add or not add the lock after a SCardReconnect. I suppose it would be something similar to the patch attached (comments are welcomed).
Ludovic, it is up to you. You can consider better than me which one is the better approach. If you think it is better to patch opensc to act differently depending windows or not windows I will try to submit a pull requests to opensc referencing bug #475.
Thank you very much in deep.
From: Ricardo Martin <rickyepoderi at yahoo.es>
To: Talks about MUSCLE <pcsclite-muscle at lists.alioth.debian.org>
Sent: Tuesday, June 2, 2015 11:55 AM
Subject: Re: [Pcsclite-muscle] question about locking and reconnect
Hi again,
In my little understanding the idea behind SCardReconnect is that it is just a SCardDisconnect + SCardConnect. And, because SCardDisconnect releases any lock, SCardReconnect should also do the same. If you want to lock you need to start the transaction again just like after a normal SCardConnect (in shared mode of course).
Regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20150603/d3101a60/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reader-pcsc.c.patch
Type: text/x-diff
Size: 1108 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20150603/d3101a60/attachment-0001.patch>
More information about the pcsclite-muscle
mailing list