mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-05-26 23:26:18 +00:00
Fix internal current target when using nfc_initiator_poll_target() (Thanks to Bjoern Kinscher)
Fixes Issue 265.
This commit is contained in:
@@ -1209,10 +1209,16 @@ pn53x_initiator_poll_target(struct nfc_device *pnd,
|
|||||||
switch (res) {
|
switch (res) {
|
||||||
case 1:
|
case 1:
|
||||||
*pnt = ntTargets[0];
|
*pnt = ntTargets[0];
|
||||||
|
if (pn53x_current_target_new(pnd, pnt) == NULL) {
|
||||||
|
return pnd->last_error = NFC_ESOFT;
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
*pnt = ntTargets[1]; // We keep the selected one
|
*pnt = ntTargets[1]; // We keep the selected one
|
||||||
|
if (pn53x_current_target_new(pnd, pnt) == NULL) {
|
||||||
|
return pnd->last_error = NFC_ESOFT;
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user