summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2012-02-06 13:45:58 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-06 13:45:58 -0800
commit146a80875c2f5f93ab550feaaf793c1b327ba6e1 (patch)
tree3e1baed239d2fe736b1176c465b5833e372752c7
parent7ae3a3419a4d5c59cb6d59969d952665acfca5f6 (diff)
parentce7e8806d59161969589c46abbef8ed1436cea8f (diff)
downloadexternal_libnfc-nxp-146a80875c2f5f93ab550feaaf793c1b327ba6e1.zip
external_libnfc-nxp-146a80875c2f5f93ab550feaaf793c1b327ba6e1.tar.gz
external_libnfc-nxp-146a80875c2f5f93ab550feaaf793c1b327ba6e1.tar.bz2
Merge "Fixed FRMR sending on invalid LLCP frame received"
-rw-r--r--src/phFriNfc_LlcpTransport.c4
-rw-r--r--src/phFriNfc_LlcpTransport_Connection.c20
2 files changed, 12 insertions, 12 deletions
diff --git a/src/phFriNfc_LlcpTransport.c b/src/phFriNfc_LlcpTransport.c
index 61284bd..870aeb4 100644
--- a/src/phFriNfc_LlcpTransport.c
+++ b/src/phFriNfc_LlcpTransport.c
@@ -868,9 +868,9 @@ NFCSTATUS phFriNfc_LlcpTransport_SendFrameReject(phFriNfc_LlcpTransport_t
status = phFriNfc_LlcpTransport_ConnectionOriented_Close(&psTransport->pSocketTable[index]);
/* Set FRMR Header */
- psTransport->sLlcpHeader.dsap = dsap;
+ psTransport->sLlcpHeader.dsap = ssap;
psTransport->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_FRMR;
- psTransport->sLlcpHeader.ssap = ssap;
+ psTransport->sLlcpHeader.ssap = dsap;
/* Set FRMR Information Field */
flagValue = (WFlag<<7) | (IFlag<<6) | (RFlag<<5) | (SFlag<<4) | rejectedPTYPE;
diff --git a/src/phFriNfc_LlcpTransport_Connection.c b/src/phFriNfc_LlcpTransport_Connection.c
index 346558c..63e2ff5 100644
--- a/src/phFriNfc_LlcpTransport_Connection.c
+++ b/src/phFriNfc_LlcpTransport_Connection.c
@@ -491,9 +491,9 @@ static void Handle_ConnectionFrame(phFriNfc_LlcpTransport_t *psTransport,
/* Incorrect TLV */
/* send FRMR */
status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
- ssap,
- PHFRINFC_LLCP_PTYPE_CONNECT,
dsap,
+ PHFRINFC_LLCP_PTYPE_CONNECT,
+ ssap,
0x00,
0x00,
0x00,
@@ -661,9 +661,9 @@ static void Handle_ConnectionCompleteFrame(phFriNfc_LlcpTransport_t *psTran
/* Incorrect TLV */
/* send FRMR */
status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
- ssap,
- PHFRINFC_LLCP_PTYPE_CC,
dsap,
+ PHFRINFC_LLCP_PTYPE_CC,
+ ssap,
0x00,
0x00,
0x00,
@@ -820,9 +820,9 @@ static void Handle_DisconnetModeFrame(phFriNfc_LlcpTransport_t *psTransport
{
/* send FRMR */
status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
- ssap,
- PHFRINFC_LLCP_PTYPE_DM,
dsap,
+ PHFRINFC_LLCP_PTYPE_DM,
+ ssap,
0x00,
0x00,
0x00,
@@ -1000,9 +1000,9 @@ static void Handle_Receive_IFrame(phFriNfc_LlcpTransport_t *psTransport,
{
/* Send FRMR */
status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
- ssap,
- PHFRINFC_LLCP_PTYPE_I,
dsap,
+ PHFRINFC_LLCP_PTYPE_I,
+ ssap,
&sLlcpLocalSequence,
WFlag,
IFlag,
@@ -1227,7 +1227,7 @@ static void Handle_ReceiveReady_Frame(phFriNfc_LlcpTransport_t *psTransport
{
/* Send FRMR */
status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
- ssap, PHFRINFC_LLCP_PTYPE_RR, dsap,
+ dsap, PHFRINFC_LLCP_PTYPE_RR, ssap,
&sLlcpLocalSequence,
WFlag, IFlag, RFlag, SFlag,
psLocalLlcpSocket->socket_VS,
@@ -1342,7 +1342,7 @@ static void Handle_ReceiveNotReady_Frame(phFriNfc_LlcpTransport_t *psTransp
{
/* Send FRMR */
status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
- ssap, PHFRINFC_LLCP_PTYPE_RNR, dsap,
+ dsap, PHFRINFC_LLCP_PTYPE_RNR, ssap,
&sLlcpLocalSequence,
bWFlag, bIFlag, bRFlag, bSFlag,
psLocalLlcpSocket->socket_VS,