[Pcsclite-muscle] Difference with Windows (maybe a bug)

Ludovic Rousseau ludovic.rousseau at gmail.com
Fri Sep 23 09:22:57 UTC 2016


2016-09-23 11:03 GMT+02:00 Abraham Macias Paredes <amacias at solutia-it.es>:

> Hi PCSC lite Project people,
>

Hello,


> I’m developing a software that must work in Windows and Linux. And I found
> a difference between Windows PCSC API and “pcsc-lite” that may be a bug.
>
>
>
> The software has several threads. In a thread a “SCardGetStatusChange” is
> performed and it locks until there is a change in the status.
>
> When another thread performs a “SCardConnect”, in Windows the
> “SCardGetStatusChange” call returns with the “SCARD_STATE_INUSE”  flag
> activated. But in Linux the thread continues locked at
> “SCardGetStatusChange”.
>
>
>
> *Windows trace:*
>
>
>
> Thread 1: SmartCard SCardGetStatusChange(context: CD00000100000000,
> timeout: ffffffff)
>
> Thread 1:  atr = 3b 7f ffffff96 0 0 0 6a 46 4e 4d 54 3 4 11 43 4 30 3
> ffffff90 0
>
> Thread 1:  [0]   Dell Smart Card Reader Keyboard 0
>
> Thread 1:         user: null, state: 0xb0420, event: 0xb0422
>
> Thread 2: SmartCard SCardConnect(context: CD00000100000001, share: 2,
> proto: 3, reader: 'Dell Smart Card Reader Keyboard 0')
>
> Thread 1:  -> [0]  Dell Smart Card Reader Keyboard 0
>
> Thread 1:  ->       user: null, state: 0xb0420, event: 0xb0122
>
>
>
>
>
> Thread 2: SmartCard Connect successful: 1 hCard: EA00000100000000
>
>
>
> *Linux trace:*
>
>
>
> Thread 1: SmartCard SCardGetStatusChange(context: CD00000100000000,
> timeout: ffffffff)
>
> Thread 1:  atr = 3b 7f ffffff96 0 0 0 6a 46 4e 4d 54 3 4 11 43 4 30 3
> ffffff90 0
>
> Thread 1:  [0]   Dell Smart Card Reader Keyboard 0
>
> Thread 1:         user: null, state: 0x20, event: 0x22
>
> Thread 2:  SmartCard SCardConnect(context: CD00000100000001, share: 2,
> proto: 3, reader: 'Dell Smart Card Reader Keyboard 0')
>
> Thread 2:  SmartCard Connect successful: 1 hCard: EA00000100000000
>
>
>
> If I use another thread to perform another “SCardGetStatusChange”, the
> status shows the “SCARD_STATE_INUSE” flag activated, but the first thread
> is still locked.
>

Can you share your sample code with us?

Thanks

-- 
 Dr. Ludovic Rousseau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20160923/35c27329/attachment.html>


More information about the Pcsclite-muscle mailing list