From 37c404b1287d0d04de20628235fdc3273aabe035 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Thu, 18 Feb 2010 16:45:24 +0000 Subject: [PATCH] ilibfreefare: The transfer operation actually returns something. --- libfreefare/mifare_classic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libfreefare/mifare_classic.c b/libfreefare/mifare_classic.c index 7c2298e..d705a71 100644 --- a/libfreefare/mifare_classic.c +++ b/libfreefare/mifare_classic.c @@ -500,12 +500,13 @@ mifare_classic_transfer (MifareClassicTag tag, const MifareClassicBlockNumber bl // Send command size_t n; - if (!(nfc_initiator_transceive_dep_bytes (tag->device, command, sizeof (command), NULL, &n))) { + unsigned char buffer[1]; + if (!(nfc_initiator_transceive_dep_bytes (tag->device, command, sizeof (command), buffer, &n))) { errno = EIO; return -1; } - // No result. The MIFARE tag just ACKed. + // FIXME: The receive command returns data. Should be checked. return 0; }