diff options
author | Martijn Coenen <maco@google.com> | 2013-04-25 17:27:48 -0700 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2013-04-25 17:27:48 -0700 |
commit | 42f5b41d22bbbad1b16b9cd3aba0512a399f32a6 (patch) | |
tree | 4b2e769ad15695188332d89e425e43ef809b4aa0 | |
parent | d508d9900a7d318073bd7b308d094755df316527 (diff) | |
download | android_external_libnfc-nxp-42f5b41d22bbbad1b16b9cd3aba0512a399f32a6.tar.gz android_external_libnfc-nxp-42f5b41d22bbbad1b16b9cd3aba0512a399f32a6.tar.bz2 android_external_libnfc-nxp-42f5b41d22bbbad1b16b9cd3aba0512a399f32a6.zip |
Return NFCSTATUS_BUSY in case of invalid state transition.
This allows the caller to recovery by trying again.
Bug: 8552749
Change-Id: Iff979c097d33f9adda06654de9e588595daf89a3
-rw-r--r-- | src/phHciNfc_Sequence.c | 2 | ||||
-rw-r--r-- | src/phLibNfc_discovery.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/phHciNfc_Sequence.c b/src/phHciNfc_Sequence.c index 1ef7265..6d0bf13 100644 --- a/src/phHciNfc_Sequence.c +++ b/src/phHciNfc_Sequence.c @@ -456,7 +456,7 @@ phHciNfc_FSM_Validate( } /* End of State Validation Switch */ if( NFC_FSM_IN_PROGRESS == psHciContext->hci_state.transition ) { - status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_STATE); + status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_BUSY); } break; } diff --git a/src/phLibNfc_discovery.c b/src/phLibNfc_discovery.c index 1fe4d8f..c512f73 100644 --- a/src/phLibNfc_discovery.c +++ b/src/phLibNfc_discovery.c @@ -194,7 +194,14 @@ NFCSTATUS phLibNfc_Mgt_ConfigureDiscovery ( } else { - RetVal=NFCSTATUS_FAILED; + if (PHNFCSTATUS(RetVal) == NFCSTATUS_BUSY) + { + RetVal = NFCSTATUS_BUSY; + } + else + { + RetVal=NFCSTATUS_FAILED; + } } } |