diff options
author | Sylvain Fonteneau <sylvain.fonteneau@trusted-logic.com> | 2011-04-08 08:18:08 +0200 |
---|---|---|
committer | Jeff Hamilton <jham@android.com> | 2011-04-14 10:11:47 -0500 |
commit | 7b40e6d4b45110797cdea7d451d313af891bf6e3 (patch) | |
tree | d61da78a85dd5431b149b316dd064c295bf62de2 /src | |
parent | 46dbed4e11700226e9b43ca17e5ad6f3d192bf63 (diff) | |
download | external_libnfc-nxp-7b40e6d4b45110797cdea7d451d313af891bf6e3.zip external_libnfc-nxp-7b40e6d4b45110797cdea7d451d313af891bf6e3.tar.gz external_libnfc-nxp-7b40e6d4b45110797cdea7d451d313af891bf6e3.tar.bz2 |
Avoid missing NFCIP inbound frame.
If a NFCIP frame is received (NXP_EVT_NFC_RCV_DATA event) before a call to
phHal4Nfc_Receive() function, the frame was lost. This could happen if the local
host acts as a Target and the remote peer sends its first frame too fast.
The data is actually saved in a temporary buffer but, when the phHal4Nfc_Receive()
is eventualy called, it triggers a callback with a status code
NFCSTATUS_MORE_INFORMATION, which is handled as an error.
This patch fixes this behaviour and makes sure that the correct status
code is provided with the frame itself.
Change-Id: I5311762ca70c71f98dea0287b0844eb1c8dddb6b
Diffstat (limited to 'src')
-rw-r--r-- | src/phHal4Nfc_P2P.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/phHal4Nfc_P2P.c b/src/phHal4Nfc_P2P.c index 47a64de..99c5978 100644 --- a/src/phHal4Nfc_P2P.c +++ b/src/phHal4Nfc_P2P.c @@ -478,7 +478,7 @@ void phHal4Nfc_RecvCompleteHandler(phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,void *pInfo) Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId = PH_OSALNFC_INVALID_TIMER_ID; Hal4Ctxt->psTrcvCtxtInfo->RecvDataBufferStatus - = NFCSTATUS_MORE_INFORMATION; + = NFCSTATUS_PENDING; } } if(NULL == Hal4Ctxt->psTrcvCtxtInfo) |