From c9f88e17a1c50061159f779934f8d91ea1b3edd5 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Wed, 18 Aug 2010 14:44:19 +0000 Subject: [PATCH] Reset pnd->iLastError in nfc.c. --- libnfc/chips/pn53x.c | 2 -- libnfc/nfc.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index e1b4555..9580cb9 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -463,8 +463,6 @@ pn53x_InAutoPoll(nfc_device_t* pnd, bool res; byte_t *pbtTxInAutoPoll; - pnd->iLastError = 0; - if(pnd->nc == NC_PN531) { // TODO This function is not supported by pn531 (set errno = ENOSUPP or similar) return false; diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 53368c6..ec5c4c2 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -593,6 +593,8 @@ nfc_initiator_poll_targets(nfc_device_t* pnd, const byte_t btPollNr, const byte_t btPeriod, nfc_target_t* pntTargets, size_t* pszTargetFound) { + pnd->iLastError = 0; + return pn53x_InAutoPoll(pnd, pnttTargetTypes, szTargetTypes, btPollNr, btPeriod, pntTargets, pszTargetFound); }