[Pcsclite-muscle] Asynchronous PCSC API
Ievgenii Meshcheriakov
ievgenii.meshcheriakov at qt.io
Tue Jan 25 03:55:37 PST 2022
понеділок, 24 січня 2022 р. 18:12:17 CET Ludovic Rousseau написано:
> Le lun. 24 janv. 2022 à 15:26, Ievgenii Meshcheriakov
>
> <ievgenii.meshcheriakov at qt.io> a écrit :
> > Hi Ludovic,
>
> Hello Ievgenii,
>
> > пʼятниця, 21 січня 2022 р. 15:31:50 CET Ludovic Rousseau написано:
> > > I am afraid you will have to use threads or something similar in your
> > > case.
> >
> > It looks like I cannot even reliably use threads because SCardConnect() is
> > not cancellable using SCardCancel (more info here:
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004297). Is there any
> > other way to cancel connection?
> Since it is an upstream change I prefer to discuss it here instead of
> in a Debian bug. The problem is not Debian specific.
>
> It is not exactly what you request but have a look at
> https://salsa.debian.org/rousseau/PCSC/-/commit/c7cd36bd165f386755aa71af9e6c
> 28fc93f3bf45
Setting PCSCLITE_NO_BLOCKING didn't help, the SCardConnect call is still
blocking and cannot be cancelled.
> Have you tried your sample code on Windows?
> What is the behaviour of WinSCard on Windows?
I've adapted the code for Windows and there the SCardConnect call is still
blocking, but it can be cancelled using SCardCancel. The return value is then
SCARD_E_CANCELLED as expected.
Regards,
Ievgenii
More information about the pcsclite-muscle
mailing list