Tag is no more active if authentication failed.

This commit is contained in:
Romuald Conty 2009-12-26 03:37:20 +00:00
parent a5dd66f77d
commit 3c4d6ff095

View file

@ -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;
} }