From a4e934c0064207c176d4dc4b1937211f6ef11614 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Thu, 13 Jun 2013 17:20:27 +0000 Subject: [PATCH] nfc-eventd: fix tag removing detection git-svn-id: https://nfc-tools.googlecode.com/svn/trunk/nfc-eventd@1139 ba5c3050-9c55-11de-a262-85a698460a8e --- src/nfc-eventd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nfc-eventd.c b/src/nfc-eventd.c index 58430bf..53d3145 100644 --- a/src/nfc-eventd.c +++ b/src/nfc-eventd.c @@ -312,7 +312,7 @@ ned_poll_for_tag(nfc_device* nfc_device, nfc_target* tag) const nfc_modulation nm[1] = { { .nmt = NMT_ISO14443A, .nbr = NBR_106 } }; if( tag != NULL ) { - /* We are looking for a previous tag */ + /* We are looking for a previous tag */ /* In this case, to prevent for intensive polling we add a sleeping time */ sleep ( polling_time ); uiPollNr = 3; /* Polling duration : btPollNr * szTargetTypes * btPeriod * 150 = btPollNr * 300 = 900 */ @@ -323,7 +323,7 @@ ned_poll_for_tag(nfc_device* nfc_device, nfc_target* tag) nfc_target target; int res = nfc_initiator_poll_target (nfc_device, nm, 1, uiPollNr, uiPeriod, &target); - if (res >= 0) { + if (res > 0) { if ( (tag != NULL) && (0 == memcmp(tag->nti.nai.abtUid, target.nti.nai.abtUid, target.nti.nai.szUidLen)) ) { return tag; } else {