From 49adea74868aa2bac7b3f0a1c82be9d956d3a86e Mon Sep 17 00:00:00 2001 From: Sunil Jogi Date: Thu, 26 Jan 2012 17:07:20 -0800 Subject: Update for LLCP V(SA) internal variable The V(SA) is an internal variable used in LLCP connection-oriented data links to check receive window conditions. It corresponds to the last frame number acknowledged by remote peer + 1. The patch makes sure this variable is updated evry time it is needed. Change-Id: Ie5ac925a6f1dfa19b22ac2b6e96659440d5daf21 --- src/phFriNfc_LlcpTransport_Connection.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/phFriNfc_LlcpTransport_Connection.c b/src/phFriNfc_LlcpTransport_Connection.c index a40c505..54e8610 100644 --- a/src/phFriNfc_LlcpTransport_Connection.c +++ b/src/phFriNfc_LlcpTransport_Connection.c @@ -1016,6 +1016,9 @@ static void Handle_Receive_IFrame(phFriNfc_LlcpTransport_t *psTransport, } else { + /* Update VSA */ + psLocalLlcpSocket->socket_VSA = (uint8_t)sLlcpLocalSequence.nr; + /* Test if the Linear Buffer length is null */ if(psLocalLlcpSocket->bufferLinearLength == 0) { @@ -1032,9 +1035,6 @@ static void Handle_Receive_IFrame(phFriNfc_LlcpTransport_t *psTransport, /* Update VR */ psLocalLlcpSocket->socket_VR = (psLocalLlcpSocket->socket_VR+1)%16; - /* Update VSA */ - psLocalLlcpSocket->socket_VSA = (uint8_t)sLlcpLocalSequence.nr; - /* Call the Receive CB */ psLocalLlcpSocket->pfSocketRecv_Cb(psLocalLlcpSocket->pRecvContext, NFCSTATUS_SUCCESS); psLocalLlcpSocket->pfSocketRecv_Cb = NULL; @@ -1100,9 +1100,6 @@ static void Handle_Receive_IFrame(phFriNfc_LlcpTransport_t *psTransport, /* Update VR */ psLocalLlcpSocket->socket_VR = (psLocalLlcpSocket->socket_VR+1)%16; - /* Update VSA */ - psLocalLlcpSocket->socket_VSA = (uint8_t)sLlcpLocalSequence.nr; - /* Update the length */ psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket->localRW)].length = 0x00; -- cgit v1.1