[libnfc] push by yob...@gmail.com - nfc_initiator_target_is_present(): Fixes issue #267, second attempt on 2014-02-09 23:02 GMT

3 views
Skip to first unread message

lib...@googlecode.com

unread,
Feb 9, 2014, 6:02:22 PM2/9/14
to libnfc-...@googlegroups.com
Revision: fd30e63b8008
Author: Philippe Teuwen <yob...@gmail.com>
Date: Sun Feb 9 23:01:34 2014 UTC
Log: nfc_initiator_target_is_present(): Fixes issue #267, second
attempt

http://code.google.com/p/libnfc/source/detail?r=fd30e63b8008

Modified:
/libnfc/chips/pn53x.c

=======================================
--- /libnfc/chips/pn53x.c Fri Feb 7 13:00:25 2014 UTC
+++ /libnfc/chips/pn53x.c Sun Feb 9 23:01:34 2014 UTC
@@ -1791,7 +1791,7 @@
log_put(LOG_GROUP, LOG_CATEGORY,
NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping -4A");
if (CHIP_DATA(pnd)->type == PN533) {
ret = pn53x_Diagnose06(pnd);
- if ((ret == NFC_ETIMEOUT) && (CHIP_DATA(pnd)->type == PN533)) {
+ if ((ret == NFC_ETIMEOUT) || (ret == NFC_ETGRELEASED)) {
// This happens e.g. when a JCOP31 is removed from PN533
// InRelease takes an abnormal time to reply so let's take care of
it now with large timeout:
const uint8_t abtCmd[] = { InRelease, 0x00 };
Reply all
Reply to author
Forward
0 new messages