mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-27 12:16:34 +00:00
Fix nfc_target_init() timeout return
This patch prevent from returning a successfull error code while timeout occurred. Thanks to blck on forum: http://www.libnfc.org/community/post/4913/#p4913
This commit is contained in:
@@ -1911,7 +1911,7 @@ pn53x_target_init(struct nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const
|
||||
|
||||
if ((res = pn53x_TgInitAsTarget(pnd, ptm, pbtMifareParams, pbtTkt, szTkt, pbtFeliCaParams, pbtNFCID3t, pbtGBt, szGBt, pbtRx, szRxLen, &btActivatedMode, timeout)) < 0) {
|
||||
if (res == NFC_ETIMEOUT) {
|
||||
return pn53x_idle(pnd);
|
||||
pn53x_idle(pnd);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user