From 2be6d8ddef33c25c23a1457f683b5f5443cdbd79 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Wed, 28 Sep 2011 15:32:01 +0000 Subject: [PATCH] Sync w/ libnfc-1.5.1 (Fixes Issue 79) --- configure.ac | 2 +- src/mfoc.c | 2 +- src/mifare.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 8a68c44..668ca6d 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) # Checks for pkg-config modules. -LIBNFC_REQUIRED_VERSION=1.4.2 +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/src/mfoc.c b/src/mfoc.c index 1e16283..1bfe8f0 100644 --- a/src/mfoc.c +++ b/src/mfoc.c @@ -681,7 +681,7 @@ int mf_enhanced_auth(int e_sector, int a_sector, mftag t, mfreader r, denonce *d exit (EXIT_FAILURE); } - if (!nfc_initiator_transceive_bytes(r.pdi, Auth, 4, Rx, &RxLen)) { + if (!nfc_initiator_transceive_bytes(r.pdi, Auth, 4, Rx, &RxLen, NULL)) { fprintf(stdout, "Error while requesting plain tag-nonce\n"); exit(EXIT_FAILURE); } diff --git a/src/mifare.c b/src/mifare.c index 360d5cf..b7caaf8 100644 --- a/src/mifare.c +++ b/src/mifare.c @@ -100,7 +100,7 @@ nfc_initiator_mifare_cmd (nfc_device_t * pnd, const mifare_cmd mc, const uint8_t return false; } // Fire the mifare command - if (!nfc_initiator_transceive_bytes (pnd, abtCmd, 2 + szParamLen, abtRx, &szRx)) { + if (!nfc_initiator_transceive_bytes (pnd, abtCmd, 2 + szParamLen, abtRx, &szRx, NULL)) { if (pnd->iLastError == EINVRXFRAM) { // "Invalid received frame" AKA EINVRXFRAM, usual means we are // authenticated on a sector but the requested MIFARE cmd (read, write)