Fix internal current target when using nfc_initiator_poll_target() (Thanks to Bjoern Kinscher)

Fixes Issue 265.
This commit is contained in:
Romuald Conty 2014-01-28 10:45:05 +01:00
parent b7f590acc8
commit e5c732e181

View file

@ -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: