Skip to content

Commit

Permalink
Fix internal current target when using nfc_initiator_poll_target() (T…
Browse files Browse the repository at this point in the history
…hanks to Bjoern Kinscher)

Fixes Issue 265.
  • Loading branch information
neomilium committed Jan 28, 2014
1 parent b7f590a commit e5c732e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libnfc/chips/pn53x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,10 +1209,16 @@ pn53x_initiator_poll_target(struct nfc_device *pnd,
switch (res) {
case 1:
*pnt = ntTargets[0];
if (pn53x_current_target_new(pnd, pnt) == NULL) {
return pnd->last_error = NFC_ESOFT;
}
return res;
break;
case 2:
*pnt = ntTargets[1]; // We keep the selected one
if (pn53x_current_target_new(pnd, pnt) == NULL) {
return pnd->last_error = NFC_ESOFT;
}
return res;
break;
default:
Expand Down

0 comments on commit e5c732e

Please sign in to comment.