summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunil Jogi <sunil.jogi@nxp.com>2012-01-26 17:22:21 -0800
committerMartijn Coenen <maco@google.com>2012-01-27 15:18:18 -0800
commitffdbd5c4c6574af205d7bb657c9aec025db6e8ac (patch)
treef3c30ecefa96df92a4e9aac16b823afc6ff5db92
parent49adea74868aa2bac7b3f0a1c82be9d956d3a86e (diff)
downloadexternal_libnfc-nxp-ffdbd5c4c6574af205d7bb657c9aec025db6e8ac.zip
external_libnfc-nxp-ffdbd5c4c6574af205d7bb657c9aec025db6e8ac.tar.gz
external_libnfc-nxp-ffdbd5c4c6574af205d7bb657c9aec025db6e8ac.tar.bz2
Reset LLCP socket internal variables before next use.
Some internal variables used in reveive window checkings were not reset on socket closure/re-opening. This was leading to have the send() function waiting forever for remote acknowledgments. Change-Id: Ic7741b004de80af3f851f620842d46c42f654804
-rw-r--r--src/phFriNfc_LlcpTransport_Connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/phFriNfc_LlcpTransport_Connection.c b/src/phFriNfc_LlcpTransport_Connection.c
index 54e8610..c3b92f3 100644
--- a/src/phFriNfc_LlcpTransport_Connection.c
+++ b/src/phFriNfc_LlcpTransport_Connection.c
@@ -2103,6 +2103,9 @@ static void phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB(void*
pLlcpSocket->socket_VR = 0;
pLlcpSocket->socket_VRA = 0;
+ pLlcpSocket->indexRwRead = 0;
+ pLlcpSocket->indexRwWrite = 0;
+
phFriNfc_LlcpTransport_ConnectionOriented_Abort(pLlcpSocket);
memset(&pLlcpSocket->sSocketOption, 0x00, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t));
@@ -2164,6 +2167,9 @@ NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_Close(phFriNfc_LlcpTransport
pLlcpSocket->socket_VR = 0;
pLlcpSocket->socket_VRA = 0;
+ pLlcpSocket->indexRwRead = 0;
+ pLlcpSocket->indexRwWrite = 0;
+
phFriNfc_LlcpTransport_ConnectionOriented_Abort(pLlcpSocket);
memset(&pLlcpSocket->sSocketOption, 0x00, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t));