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 (readerslen <= 0) {
|
||||||
RELAY_ERROR("Could not find reader number %u\n", readernum);
|
if (readernum == READERNUM_AUTODETECT) {
|
||||||
r = SCARD_E_UNKNOWN_READER;
|
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;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user