On 03/07/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
G'day,

Hello,

I'm using pcsclite-1.3.0 and ccid-1.0.0.

I've got a thread that calls SCardEstablishContext(), then monitors card
events by calling SCardListReaders() and SCardGetStatusChange().

This will works fine, until pcscd is killed. After that,
SCardListReaders() returns an empty list and SCardGetStatusChange()
returns SCARD_S_SUCCESS (since it is acting on a zero-length list of
states).

If pcscd is restarted, SCardListReaders() and SCardGetStatusChange()
still act as before: zero readers are returned, and both functions
return SCARD_S_SUCCESS.

I tried to reproduce the bug but I get a SCARD_E_NO_SERVICE error. I
don't know how you can get a SCARD_S_SUCCESS.

In fact I get a SIG_PIPE signal since libpcsclite is trying to write
on a pipe closed when the old pcscd died. If I add a signal(SIGPIPE,
SIG_IGN); in the application I get the SCARD_E_NO_SERVICE error.

I assume that the original context needs to be released, and a new
context obtained via a call to SCardEstablishContext().

That should work.

Why is pcscd stooped and restarted?
Are you on Mac OS X?

Is there an API call to determine that the current context handle is no
longer valid (for pcsclite, this would mean detecting that the
underlying PC/SC daemon has been killed) so that SCardEstablishContext()
can be called again?

I think the application should get a SCARD_E_INVALID_HANDLE error.


Can you send me your sample program so I can reproduce the problem here?

Thanks,

--
 Dr. Ludovic Rousseau
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to