diff options
author | daniel_Tomas <daniel.tomas@trusted-logic.com> | 2010-11-19 09:51:28 +0100 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2010-12-05 18:33:18 -0800 |
commit | 6e286043593b281d161dad4969e05ba9c53ef6d1 (patch) | |
tree | b74fe3829b5be2fe04f5e5f76b832565368d5d56 /src/phLibNfc_initiator.c | |
parent | 75b0473b9eedf7673ed4502978205f4fa5563357 (diff) | |
download | external_libnfc-nxp-6e286043593b281d161dad4969e05ba9c53ef6d1.zip external_libnfc-nxp-6e286043593b281d161dad4969e05ba9c53ef6d1.tar.gz external_libnfc-nxp-6e286043593b281d161dad4969e05ba9c53ef6d1.tar.bz2 |
LLCP modification for concurence accesses
Change-Id: I428c58dfc2c791f87e0f5761f11bb59d26ad85b1
Diffstat (limited to 'src/phLibNfc_initiator.c')
-rw-r--r-- | src/phLibNfc_initiator.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/phLibNfc_initiator.c b/src/phLibNfc_initiator.c index efb7ec1..a694e6f 100644 --- a/src/phLibNfc_initiator.c +++ b/src/phLibNfc_initiator.c @@ -650,17 +650,19 @@ NFCSTATUS phLibNfc_RemoteDev_Disconnect( phLibNfc_Handle hRemote { if((eLibNfcHalStateRelease == gpphLibContext->LibNfcState.next_state) ||((gpphLibContext->sSeContext.eActivatedMode == phLibNfc_SE_ActModeWired)&& - (ReleaseType != NFC_SMARTMX_RELEASE)) - ||((gpphLibContext->sSeContext.eActivatedMode != phLibNfc_SE_ActModeWired)&& - (ReleaseType == NFC_SMARTMX_RELEASE))) + (ReleaseType != NFC_SMARTMX_RELEASE)) + ||((gpphLibContext->sSeContext.eActivatedMode != phLibNfc_SE_ActModeWired)&& + (ReleaseType == NFC_SMARTMX_RELEASE))) { /* Previous disconnect callback is pending */ RetVal = NFCSTATUS_REJECTED; } +#ifndef LLCP_CHANGES else if(eLibNfcHalStateTransaction == gpphLibContext->LibNfcState.next_state) { /* Previous Transaction is Pending*/ RetVal = NFCSTATUS_BUSY; PHDBG_INFO("LibNfc:Transaction is Pending"); } +#endif /* #ifdef LLCP_CHANGES */ else { gpphLibContext->ReleaseType = ReleaseType; @@ -820,6 +822,13 @@ phLibNfc_RemoteDev_Transceive(phLibNfc_Handle hRemoteDevice, { RetVal = NFCSTATUS_REJECTED; } +#ifdef LLCP_TRANSACT_CHANGES + else if ((LLCP_STATE_RESET_INIT != gpphLibContext->llcp_cntx.sLlcpContext.state) + && (LLCP_STATE_CHECKED != gpphLibContext->llcp_cntx.sLlcpContext.state)) + { + RetVal= NFCSTATUS_BUSY; + } +#endif /* #ifdef LLCP_TRANSACT_CHANGES */ else { gpphLibContext->ndef_cntx.eLast_Call = RawTrans; |