Skip to content

Commit

Permalink
nfc-eventd: fix tag removing detection
Browse files Browse the repository at this point in the history
git-svn-id: https://nfc-tools.googlecode.com/svn/trunk/nfc-eventd@1139 ba5c3050-9c55-11de-a262-85a698460a8e
  • Loading branch information
neomilium committed Apr 7, 2015
1 parent 8abd554 commit a4e934c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nfc-eventd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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 {
Expand Down

0 comments on commit a4e934c

Please sign in to comment.