summaryrefslogtreecommitdiffstats
path: root/src/phFriNfc_LlcpTransport_Connection.c
diff options
context:
space:
mode:
authorArnaud Ferir <arnaud.ferir@trusted-logic.com>2010-12-15 11:55:06 +0100
committerNick Pelly <npelly@google.com>2011-01-18 13:07:22 -0800
commit1ec4ace9cd3079abd7c0b30d0976591c8c0f441e (patch)
tree5139f41b69cafae52c69f9e4de0a7a2f9b1cde34 /src/phFriNfc_LlcpTransport_Connection.c
parent2cabc1d1656f6072bee0e43504cda869336fc390 (diff)
downloadexternal_libnfc-nxp-1ec4ace9cd3079abd7c0b30d0976591c8c0f441e.zip
external_libnfc-nxp-1ec4ace9cd3079abd7c0b30d0976591c8c0f441e.tar.gz
external_libnfc-nxp-1ec4ace9cd3079abd7c0b30d0976591c8c0f441e.tar.bz2
Call the LLCP send callback in error cases.
This avoids an application to be stuck in a send request while the LLCP link has been lost (i.e. remote peer lost). Change-Id: I74982d497c410ae4bdb466afac013efc9eb17b03
Diffstat (limited to 'src/phFriNfc_LlcpTransport_Connection.c')
-rw-r--r--src/phFriNfc_LlcpTransport_Connection.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/phFriNfc_LlcpTransport_Connection.c b/src/phFriNfc_LlcpTransport_Connection.c
index 2056f45..fbe2dec 100644
--- a/src/phFriNfc_LlcpTransport_Connection.c
+++ b/src/phFriNfc_LlcpTransport_Connection.c
@@ -325,6 +325,11 @@ static void phFriNfc_LlcpTransport_ConnectionOriented_SendLlcp_CB(void* p
else
{
/* Send CB error */
+ if(psTransport->pSocketTable[psTransport->socketIndex].sLlcpHeader.ptype == PHFRINFC_LLCP_PTYPE_I && psTransport->pSocketTable[psTransport->socketIndex].pfSocketSend_Cb != NULL)
+ {
+ psTransport->pSocketTable[psTransport->socketIndex].pfSocketSend_Cb(psTransport->pSocketTable[psTransport->socketIndex].pSendContext,status);
+ psTransport->pSocketTable[psTransport->socketIndex].pfSocketSend_Cb = NULL;
+ }
}
}