From 3a051ec10b0cd2963370fabe354bbf1393ce8402 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 3 Nov 2016 15:00:17 +0100 Subject: [PATCH 1/1] CHG: don't consider the respons at all when sending the HALT command. --- armsrc/mifareutil.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/armsrc/mifareutil.c b/armsrc/mifareutil.c index 9c6adcce..d145e13c 100644 --- a/armsrc/mifareutil.c +++ b/armsrc/mifareutil.c @@ -472,14 +472,7 @@ int mifare_ultra_writeblock(uint8_t blockNo, uint8_t *blockData) { int mifare_classic_halt_ex(struct Crypto1State *pcs) { uint16_t len = 0; uint8_t receivedAnswer[4] = {0x00, 0x00, 0x00, 0x00}; - len = mifare_sendcmd_short(pcs, (pcs == NULL) ? CRYPT_NONE : CRYPT_ALL, 0x50, 0x00, receivedAnswer, NULL, NULL); - if (len != 0) { - if (MF_DBGLEVEL >= MF_DBG_ERROR) - Dbprintf("halt error. response len: %x data:%02X %02X %02X %02X", len, receivedAnswer[0],receivedAnswer[1],receivedAnswer[2],receivedAnswer[3]); - if (len == 1 && receivedAnswer[0] == 0x04) - return 4; - return 1; - } + mifare_sendcmd_short(pcs, (pcs == NULL) ? CRYPT_NONE : CRYPT_ALL, 0x50, 0x00, receivedAnswer, NULL, NULL); return 0; } int mifare_classic_halt(struct Crypto1State *pcs, uint32_t uid) { -- 2.39.5