Handle reader going missing

It might just be this specific reader going missing, and not all
of them.
This commit is contained in:
Pierre Ossman 2019-02-28 15:53:54 +01:00 committed by Martin Paljak
parent b227fb8b9f
commit 9e9bdac2f1
1 changed files with 2 additions and 2 deletions

View File

@ -341,8 +341,8 @@ static int refresh_attributes(sc_reader_t *reader)
LOG_FUNC_RETURN(reader->ctx, SC_SUCCESS);
}
/* the system could not dectect any reader. It means, the prevoiusly attached reader is disconnected. */
if (rv == (LONG)SCARD_E_NO_READERS_AVAILABLE || rv == (LONG)SCARD_E_SERVICE_STOPPED) {
/* the system could not detect the reader. It means, the prevoiusly attached reader is disconnected. */
if (rv == (LONG)SCARD_E_UNKNOWN_READER || rv == (LONG)SCARD_E_NO_READERS_AVAILABLE || rv == (LONG)SCARD_E_SERVICE_STOPPED) {
if (old_flags & SC_READER_CARD_PRESENT) {
reader->flags |= SC_READER_CARD_CHANGED;
}