From ffdbd5c4c6574af205d7bb657c9aec025db6e8ac Mon Sep 17 00:00:00 2001 From: Sunil Jogi Date: Thu, 26 Jan 2012 17:22:21 -0800 Subject: 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 --- src/phFriNfc_LlcpTransport_Connection.c | 6 ++++++ 1 file changed, 6 insertions(+) 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)); -- cgit v1.1