2011/7/10 Viktor Tarasov <viktor.tara...@gmail.com>:
> Hi,

Hello,

> there is patch proposal to treat properly the 'detach token(reader)' event
> and to remove the slots associated to the removed token.
>
> Tested in Linux and windows.
> 'SCardGetStatusChange' have different behavior in Linux and Windows.
> Needs to be studied and validated for Mac.
>
> https://github.com/viktorTarasov/OpenSC/commit/62bda63bd66c4849c0ca4303a9682fb6f6bacd7d

 /* When token is hot-unplugged:
  * - in Linux (pcsc-lite)
  * -- SCardGetStatusChange returns OK;
  * -- current reader state is 'UNKNOWN';
  * -- 'Refresh-attributes' returns 'SC_ERROR_READER_DETACHED'.
  *
  * - in Windows (WinSCard):
  * -- SCardGetStatusChange failes with SCARD_E_NO_READERS_AVAILABLE;
  * -- 'Refresh-attributes' returns 'SC_ERROR_NO_READERS_FOUND'.
  *
  * - FIXME: Mac?
  */

I just checked on Mac OS X 10.6.8 (Snow Leopard) and I have nearly the
same result as on GNU/Linux.
On GNU/Linux : new state is 14 => ['Changed', 'Unknown', 'Unavailable']
On Mac OS X : new state is 6 => ['Changed', 'Unknown]

On Windows, do you also get the error SCARD_E_NO_READERS_AVAILABLE
when you use TWO readers in the SCardGetStatusChange() call? That
would be very strange for me since at least 1 reader is still
available.

My sample program is available at [1] if you want to test it on Windows.

Bye

[1] 
http://anonscm.debian.org/viewvc/pcsclite/trunk/PCSC/UnitaryTests/SCardGetStatusChange.py?view=markup

-- 
 Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to