diff options
author | Jan Brands <jan.r.brands@nxp.com> | 2010-12-08 00:45:30 +0100 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2010-12-07 23:13:21 -0800 |
commit | 0e7fc7d2f5f7eaccf33ebb73a3347e51661b97fd (patch) | |
tree | 7ca2e8bdb16a6eefa40cc9a0574377175a2788df | |
parent | 74216af142920e0bce72ec3d9609ec86db211c69 (diff) | |
download | external_libnfc-nxp-0e7fc7d2f5f7eaccf33ebb73a3347e51661b97fd.zip external_libnfc-nxp-0e7fc7d2f5f7eaccf33ebb73a3347e51661b97fd.tar.gz external_libnfc-nxp-0e7fc7d2f5f7eaccf33ebb73a3347e51661b97fd.tar.bz2 |
Fix T3T R/W state detection
Change-Id: Ic77a9929111f310b689ac3aa8f90e60c151420e0
-rw-r--r-- | src/phFriNfc_FelicaMap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/phFriNfc_FelicaMap.c b/src/phFriNfc_FelicaMap.c index c59f5dd..2604649 100644 --- a/src/phFriNfc_FelicaMap.c +++ b/src/phFriNfc_FelicaMap.c @@ -2943,10 +2943,14 @@ static NFCSTATUS phFriNfc_Felica_HUpdateAttrInfo(phFriNfc_NdefMap_t *NdefMap) { NdefMap->CardState = PH_NDEFMAP_CARD_STATE_READ_ONLY; } - else + else if ( NdefMap->FelicaAttrInfo.RdWrFlag == 0x01 ) // additional check for R/W access { NdefMap->CardState = PH_NDEFMAP_CARD_STATE_READ_WRITE; } + else // otherwise invalid + { + NdefMap->CardState = PH_NDEFMAP_CARD_STATE_INVALID; + } NdefMap->FelicaAttrInfo.LenBytes[0] = NdefMap->SendRecvBuf[24]; NdefMap->FelicaAttrInfo.LenBytes[1] = NdefMap->SendRecvBuf[25]; |