From c1faa48f54a334afb3d5b4e68fc82c537e10bb7d Mon Sep 17 00:00:00 2001 From: Audrey Diacre Date: Wed, 4 Jan 2012 15:59:34 +0000 Subject: [PATCH] fix nfc_target_init(). --- libnfc/nfc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libnfc/nfc.c b/libnfc/nfc.c index dfe7586..8836fc9 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -633,27 +633,27 @@ nfc_target_init (nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, size_t * pszR int res = 0; // Disallow invalid frame if ((res = nfc_device_set_property_bool (pnd, NP_ACCEPT_INVALID_FRAMES, false)) < 0) - return false; + return res; // Disallow multiple frames if ((res = nfc_device_set_property_bool (pnd, NP_ACCEPT_MULTIPLE_FRAMES, false)) < 0) - return false; + return res; // Make sure we reset the CRC and parity to chip handling. if ((res = nfc_device_set_property_bool (pnd, NP_HANDLE_CRC, true)) < 0) - return false; + return res; if ((res = nfc_device_set_property_bool (pnd, NP_HANDLE_PARITY, true)) < 0) - return false; + return res; // Activate auto ISO14443-4 switching by default if ((res = nfc_device_set_property_bool (pnd, NP_AUTO_ISO14443_4, true)) < 0) - return false; + return res; // Activate "easy framing" feature by default if ((res = nfc_device_set_property_bool (pnd, NP_EASY_FRAMING, true)) < 0) - return false; + return res; // Deactivate the CRYPTO1 cipher, it may could cause problems when still active if ((res = nfc_device_set_property_bool (pnd, NP_ACTIVATE_CRYPTO1, false)) < 0) - return false; + return res; // Drop explicitely the field if ((res = nfc_device_set_property_bool (pnd, NP_ACTIVATE_FIELD, false)) < 0) - return false; + return res; HAL (target_init, pnd, pnt, pbtRx, pszRx); }