[Pcsclite-muscle] question about locking and reconnect
Ludovic Rousseau
ludovic.rousseau
Wed Jun 3 02:23:32 PDT 2015
2015-06-03 9:14 GMT+02:00 Ricardo Martin <rickyepoderi at yahoo.es>:
> 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).
I am working on a patch for pcsc-lite to behave like on Windows.
I just need to de more testing to avoid regressions.
As you wrote, this will not solve the problem on Mac OS X.
Maybe the problem is not present on Yosemite (10.10). Apple rewrote PC/SC.
> 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).
It will also be problematic on GNU/Linux. When pcsc-lite with the fix
is released OpenSC will have to detect what version of pcsc-lite is
used and if the pcsc_lock() needs to be call or not.
Maybe the easiest solution is to NOT change pcsc-lite and only check
if OpenSC is using Windows or not.
> 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.
OpenSC needs to be patched now. A new version of pcsc-lite will not be
available to users before a long time (2 years before the next Debian
stable for example).
My proposal
- I do not change pcsc-lite but document the difference with Windows
- you propose a patch for OpenSC
Bye
--
Dr. Ludovic Rousseau
More information about the pcsclite-muscle
mailing list