Tag is no more active if authentication failed.
This commit is contained in:
parent
a5dd66f77d
commit
3c4d6ff095
1 changed files with 1 additions and 0 deletions
|
@ -306,6 +306,7 @@ mifare_classic_authenticate (MifareClassicTag tag, const MifareClassicBlockNumbe
|
||||||
// Send command
|
// Send command
|
||||||
size_t n;
|
size_t n;
|
||||||
if (!(nfc_initiator_transceive_dep_bytes (tag->device, command, sizeof (command), NULL, &n))) {
|
if (!(nfc_initiator_transceive_dep_bytes (tag->device, command, sizeof (command), NULL, &n))) {
|
||||||
|
tag->active = false; /* Tag is no more active if authentication failed. */
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue