fixed error handling if no card found
This commit is contained in:
@@ -116,8 +116,13 @@ static int pcsc_connect(driver_data_t **driver_data)
|
||||
}
|
||||
}
|
||||
if (readerslen <= 0) {
|
||||
if (readernum == READERNUM_AUTODETECT) {
|
||||
RELAY_ERROR("Could not find a reader with a card\n");
|
||||
r = SCARD_E_NO_SMARTCARD;
|
||||
} else {
|
||||
RELAY_ERROR("Could not find reader number %u\n", readernum);
|
||||
r = SCARD_E_UNKNOWN_READER;
|
||||
}
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user