Attempt to fix Mifare Classic support after r543.
This commit is contained in:
parent
5aafbc9a48
commit
8f645fbe62
1 changed files with 6 additions and 6 deletions
|
@ -285,7 +285,7 @@ mifare_classic_authenticate (MifareTag tag, const MifareClassicBlockNumber block
|
|||
MIFARE_CLASSIC(tag)->cached_access_bits.sector_access_bits = 0x00;
|
||||
MIFARE_CLASSIC(tag)->last_authentication_key_type = key_type;
|
||||
|
||||
return (res[0] == 0) ? 0 : -1;
|
||||
return (BUFFER_SIZE (res) == 0) ? 0 : res[0];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -377,7 +377,7 @@ mifare_classic_write (MifareTag tag, const MifareClassicBlockNumber block, const
|
|||
|
||||
CLASSIC_TRANSCEIVE (tag, cmd, res);
|
||||
|
||||
return (res[0] == 0) ? 0 : -1;
|
||||
return (BUFFER_SIZE (res) == 0) ? 0 : res[0];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -399,7 +399,7 @@ mifare_classic_increment (MifareTag tag, const MifareClassicBlockNumber block, c
|
|||
|
||||
CLASSIC_TRANSCEIVE (tag, cmd, res);
|
||||
|
||||
return (res[0] == 0) ? 0 : -1;
|
||||
return (BUFFER_SIZE (res) == 0) ? 0 : res[0];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -421,7 +421,7 @@ mifare_classic_decrement (MifareTag tag, const MifareClassicBlockNumber block, c
|
|||
|
||||
CLASSIC_TRANSCEIVE (tag, cmd, res);
|
||||
|
||||
return (res[0] == 0) ? 0 : -1;
|
||||
return (BUFFER_SIZE (res) == 0) ? 0 : res[0];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -450,7 +450,7 @@ mifare_classic_restore (MifareTag tag, const MifareClassicBlockNumber block)
|
|||
|
||||
CLASSIC_TRANSCEIVE (tag, cmd, res);
|
||||
|
||||
return (res[0] == 0) ? 0 : -1;
|
||||
return (BUFFER_SIZE (res) == 0) ? 0 : res[0];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -470,7 +470,7 @@ mifare_classic_transfer (MifareTag tag, const MifareClassicBlockNumber block)
|
|||
|
||||
CLASSIC_TRANSCEIVE (tag, cmd, res);
|
||||
|
||||
return (res[0] == 0) ? 0 : -1;
|
||||
return (BUFFER_SIZE (res) == 0) ? 0 : res[0];
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue