From bcd4097d93d61a86839412879f9ccf4ed303ee15 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Mon, 1 Nov 2010 17:36:37 -0600 Subject: Fixed Mifare classic presence checking Change-Id: I7a1c90f46e669093e7c2d8778d712eeb6e6b7917 Signed-off-by: Nick Pelly --- src/phLibNfc_ndef_raw.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/phLibNfc_ndef_raw.c') diff --git a/src/phLibNfc_ndef_raw.c b/src/phLibNfc_ndef_raw.c index a208f32..1392895 100644 --- a/src/phLibNfc_ndef_raw.c +++ b/src/phLibNfc_ndef_raw.c @@ -284,6 +284,10 @@ void phLibNfc_Ndef_Read_Cb(void* Context,NFCSTATUS status) else { gpphLibContext->status.GenCb_pending_status = FALSE; + if (gpphLibContext->psBufferedAuth != NULL && gpphLibContext->ndef_cntx.psNdefMap != NULL) { + gpphLibContext->psBufferedAuth->addr = (uint8_t) + gpphLibContext->ndef_cntx.psNdefMap->StdMifareContainer.currentBlock; + } if(NFCSTATUS_FAILED == status ) { @@ -521,6 +525,10 @@ void phLibNfc_Ndef_Write_Cb(void* Context,NFCSTATUS status) else { gpphLibContext->status.GenCb_pending_status = FALSE; + if (gpphLibContext->psBufferedAuth != NULL && gpphLibContext->ndef_cntx.psNdefMap != NULL) { + gpphLibContext->psBufferedAuth->addr = (uint8_t) + gpphLibContext->ndef_cntx.psNdefMap->TLVStruct.NdefTLVBlock; + } if(status == NFCSTATUS_FAILED ) { status = NFCSTATUS_FAILED; -- cgit v1.1