From 0a7ce855b864578f41aec3d45037d84f724cf6f5 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Thu, 22 Sep 2011 13:05:07 +0000 Subject: [PATCH] Sync w/ libnfc-1.5.1. --- configure.ac | 2 +- libfreefare/mifare_classic.c | 2 +- libfreefare/mifare_desfire.c | 2 +- libfreefare/mifare_ultralight.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 078c7b4..4230349 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,7 @@ AC_CHECK_LIB([crypto], [DES_ecb_encrypt], [], [AC_MSG_ERROR([Cannot find libcryp AC_CHECK_HEADERS([openssl/aes.h openssl/des.h openssl/rand.h], [], [AC_MSG_ERROR([Cannot find openssl headers.])]) # Checks for pkg-config modules. -LIBNFC_REQUIRED_VERSION="1.4.0" +LIBNFC_REQUIRED_VERSION="1.5.1" PKG_CHECK_MODULES([LIBNFC], [libnfc >= $LIBNFC_REQUIRED_VERSION], [], [AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.])]) PKG_CONFIG_REQUIRES="libnfc" diff --git a/libfreefare/mifare_classic.c b/libfreefare/mifare_classic.c index 308f82d..0a8d034 100644 --- a/libfreefare/mifare_classic.c +++ b/libfreefare/mifare_classic.c @@ -89,7 +89,7 @@ do { \ errno = 0; \ DEBUG_XFER (msg, __##msg##_n, "===> "); \ - if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \ + if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n, NULL))) { \ if (disconnect) { \ tag->active = false; \ } \ diff --git a/libfreefare/mifare_desfire.c b/libfreefare/mifare_desfire.c index 3484f0e..d6f76e1 100644 --- a/libfreefare/mifare_desfire.c +++ b/libfreefare/mifare_desfire.c @@ -172,7 +172,7 @@ static ssize_t read_data (MifareTag tag, uint8_t command, uint8_t file_no, off_ MIFARE_DESFIRE (tag)->last_picc_error = OPERATION_OK; \ MIFARE_DESFIRE (tag)->last_pcd_error = OPERATION_OK; \ DEBUG_XFER (__msg, __len, "===> "); \ - if (!(nfc_initiator_transceive_bytes (tag->device, __msg, __len, __res, &__##res##_n))) { \ + if (!(nfc_initiator_transceive_bytes (tag->device, __msg, __len, __res, &__##res##_n, NULL))) { \ return errno = EIO, -1; \ } \ DEBUG_XFER (__res, __##res##_n, "<=== "); \ diff --git a/libfreefare/mifare_ultralight.c b/libfreefare/mifare_ultralight.c index 45703b6..e755d6a 100644 --- a/libfreefare/mifare_ultralight.c +++ b/libfreefare/mifare_ultralight.c @@ -62,7 +62,7 @@ do { \ errno = 0; \ DEBUG_XFER (msg, __##msg##_n, "===> "); \ - if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \ + if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n, NULL))) { \ return errno = EIO, -1; \ } \ DEBUG_XFER (res, __##res##_n, "<=== "); \ @@ -76,7 +76,7 @@ return -1; \ } \ DEBUG_XFER (msg, __##msg##_n, "===> "); \ - if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \ + if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n, NULL))) { \ nfc_configure (tag->device, NDO_EASY_FRAMING, true); \ return errno = EIO, -1; \ } \ @@ -323,7 +323,7 @@ is_mifare_ultralightc_on_reader (nfc_device_t *device, nfc_iso14443a_info_t nai) nfc_initiator_select_passive_target (device, modulation, nai.abtUid, nai.szUidLen, &pnti); nfc_configure (device, NDO_EASY_FRAMING, false); size_t n; - ret = nfc_initiator_transceive_bytes (device, cmd_step1, sizeof (cmd_step1), res_step1, &n); + ret = nfc_initiator_transceive_bytes (device, cmd_step1, sizeof (cmd_step1), res_step1, &n, NULL); nfc_configure (device, NDO_EASY_FRAMING, true); nfc_initiator_deselect_target (device); return ret;