Home | History | Annotate | Download | only in src

Lines Matching refs:psTransport

48    phFriNfc_LlcpTransport_t          *psTransport;
56 psTransport = (phFriNfc_LlcpTransport_t*)pContext;
61 switch(psTransport->pSocketTable[socketIndex].eSocket_State)
66 psTransport->pSocketTable[socketIndex].eSocket_State = phFriNfc_LlcpTransportSocket_eSocketConnected;
68 psTransport->pSocketTable[socketIndex].pfSocketAccept_Cb(psTransport->pSocketTable[socketIndex].pAcceptContext,status);
69 psTransport->pSocketTable[socketIndex].pfSocketAccept_Cb = NULL;
70 psTransport->pSocketTable[socketIndex].pAcceptContext = NULL;
76 psTempLlcpSocket = psTransport->pSocketTable[socketIndex];
79 result = phFriNfc_LlcpTransport_Close(&psTransport->pSocketTable[socketIndex]);
88 if(!psTransport->pSocketTable[socketIndex].bSocketSendPending && psTransport->pSocketTable[socketIndex].pfSocketSend_Cb != NULL)
90 psTransport->pSocketTable[socketIndex].pfSocketSend_Cb(psTransport->pSocketTable[socketIndex].pSendContext,status);
91 psTransport->pSocketTable[socketIndex].pfSocketSend_Cb = NULL;
102 if(!psTransport->pSocketTable[socketIndex].bSocketSendPending && psTransport->pSocketTable[socketIndex].pfSocketSend_Cb != NULL)
104 psTransport->pSocketTable[socketIndex].pfSocketSend_Cb(psTransport->pSocketTable[socketIndex].pSendContext,status);
105 psTransport->pSocketTable[socketIndex].pfSocketSend_Cb = NULL;
114 phFriNfc_LlcpTransport_t *psTransport = pSocket->psTransport;
121 if (!testAndSetSendPending(psTransport)) {
124 clearSendPending(psTransport);
150 if (!testAndSetSendPending(psTransport))
164 result = phFriNfc_LlcpTransport_LinkSend(psTransport,
170 psTransport);
173 clearSendPending(psTransport);
180 if (!testAndSetSendPending(psTransport))
189 result = phFriNfc_LlcpTransport_LinkSend(psTransport,
195 psTransport);
198 clearSendPending(psTransport);
205 if (!testAndSetSendPending(psTransport))
214 result = phFriNfc_LlcpTransport_LinkSend(psTransport,
220 psTransport);
223 clearSendPending(psTransport);
234 phFriNfc_LlcpTransport_t *psTransport = psLlcpSocket->psTransport;
251 status = phFriNfc_LlcpTransport_LinkSend(psTransport,
257 psLlcpSocket->psTransport);
313 if(testAndSetSendPending(pLlcpSocket->psTransport))
333 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
339 pLlcpSocket->psTransport);
341 clearSendPending(pLlcpSocket->psTransport);
354 if(testAndSetSendPending(pLlcpSocket->psTransport))
374 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
380 pLlcpSocket->psTransport);
382 clearSendPending(pLlcpSocket->psTransport);
463 static void Handle_ConnectionFrame(phFriNfc_LlcpTransport_t *psTransport,
490 status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
512 if(psTransport->pSocketTable[index].bSocketListenPending
513 && (sServiceName.length == psTransport->pSocketTable[index].sServiceName.length)
514 && !memcmp(sServiceName.buffer,psTransport->pSocketTable[index].sServiceName.buffer,sServiceName.length))
519 psLocalLlcpSocket = &psTransport->pSocketTable[index];
536 if(psTransport->pSocketTable[index].bSocketListenPending && psTransport->pSocketTable[index].socket_sSap == dsap)
541 psLocalLlcpSocket = &psTransport->pSocketTable[index];
561 if(psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketDefault && socketFound != TRUE)
565 psTransport->pSocketTable[index].index = index;
568 pLlcpSocket = &psTransport->pSocketTable[index];
583 else if(((psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnected)
584 || (psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketAccepted))
585 && ((psTransport->pSocketTable[index].socket_sSap == ssap)&&(psTransport->pSocketTable[index].socket_dSap == dsap)))
620 status = phFriNfc_LlcpTransport_SendDisconnectMode (psTransport,
630 status = phFriNfc_LlcpTransport_SendDisconnectMode (psTransport,
638 static void Handle_ConnectionCompleteFrame(phFriNfc_LlcpTransport_t *psTransport,
659 status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
679 if(psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnecting
680 && psTransport->pSocketTable[index].socket_sSap == dsap)
686 psTransport->pSocketTable[index].socket_dSap = ssap;
689 psLocalLlcpSocket = &psTransport->pSocketTable[index];
723 static void Handle_DisconnectFrame(phFriNfc_LlcpTransport_t *psTransport,
736 if(psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnected
737 && psTransport->pSocketTable[index].socket_sSap == dsap)
743 psLocalLlcpSocket = &psTransport->pSocketTable[index];
787 status = phFriNfc_LlcpTransport_SendDisconnectMode(psTransport,
793 psTransport->pSocketTable[index].pSocketErrCb(psTransport->pSocketTable[index].pContext, PHFRINFC_LLCP_ERR_DISCONNECTED);
803 static void Handle_DisconnetModeFrame(phFriNfc_LlcpTransport_t *psTransport,
818 status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
838 if((psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketDisconnecting
839 || psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnecting)
840 && psTransport->pSocketTable[index].socket_sSap == dsap)
846 psLocalLlcpSocket = &psTransport->pSocketTable[index];
894 static void Handle_Receive_IFrame(phFriNfc_LlcpTransport_t *psTransport,
930 if(( (psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnected)
931 || (psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketAccepted))
932 && psTransport->pSocketTable[index].socket_sSap == dsap
933 && psTransport->pSocketTable[index].socket_dSap == ssap)
939 psLocalLlcpSocket = &psTransport->pSocketTable[index];
998 status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
1042 if(!testAndSetSendPending(psLocalLlcpSocket->psTransport))
1046 clearSendPending(psTransport);
1121 if(!testAndSetSendPending(psLocalLlcpSocket->psTransport))
1125 clearSendPending(psTransport);
1159 static void Handle_ReceiveReady_Frame(phFriNfc_LlcpTransport_t *psTransport,
1184 if(psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnected
1185 && psTransport->pSocketTable[index].socket_sSap == dsap
1186 && psTransport->pSocketTable[index].socket_dSap == ssap)
1192 psLocalLlcpSocket = &psTransport->pSocketTable[index];
1193 psLocalLlcpSocket->index = psTransport->pSocketTable[index].index;
1231 status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
1259 if(!testAndSetSendPending(psLocalLlcpSocket->psTransport))
1263 clearSendPending(psTransport);
1277 static void Handle_ReceiveNotReady_Frame(phFriNfc_LlcpTransport_t *psTransport,
1302 if(psTransport->pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnected
1303 && psTransport->pSocketTable[index].socket_sSap == dsap
1304 && psTransport->pSocketTable[index].socket_dSap == ssap)
1310 psLocalLlcpSocket = &psTransport->pSocketTable[index];
1349 status = phFriNfc_LlcpTransport_SendFrameReject(psTransport,
1361 psLocalLlcpSocket->pSocketErrCb(psTransport->pSocketTable[index].pContext,PHFRINFC_LLCP_ERR_BUSY_CONDITION);
1371 if(!testAndSetSendPending(psLocalLlcpSocket->psTransport))
1375 clearSendPending(psTransport);
1388 static void Handle_FrameReject_Frame(phFriNfc_LlcpTransport_t *psTransport,
1400 if(psTransport->pSocketTable[index].socket_sSap == dsap
1401 && psTransport->pSocketTable[index].socket_dSap == ssap)
1413 psTransport->pSocketTable[index].eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDisconnected;
1416 psTransport->pSocketTable[index].pSocketErrCb( psTransport->pSocketTable[index].pContext,PHFRINFC_LLCP_ERR_FRAME_REJECTED);
1419 status = phFriNfc_LlcpTransport_ConnectionOriented_Close(&psTransport->pSocketTable[index]);
1429 void Handle_ConnectionOriented_IncommingFrame(phFriNfc_LlcpTransport_t *psTransport,
1441 Handle_ConnectionFrame(psTransport,
1449 Handle_DisconnectFrame(psTransport,
1456 Handle_ConnectionCompleteFrame(psTransport,
1464 Handle_DisconnetModeFrame(psTransport,
1472 Handle_FrameReject_Frame(psTransport,
1479 Handle_Receive_IFrame(psTransport,
1487 Handle_ReceiveReady_Frame(psTransport,
1495 Handle_ReceiveNotReady_Frame(psTransport,
1505 phFriNfc_LlcpTransport_SendFrameReject( psTransport,
1751 if(testAndSetSendPending(pLlcpSocket->psTransport))
1774 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
1780 pLlcpSocket->psTransport);
1782 clearSendPending(pLlcpSocket->psTransport);
1826 status = phFriNfc_LlcpTransport_SendDisconnectMode(pLlcpSocket->psTransport,
1945 if(testAndSetSendPending(pLlcpSocket->psTransport))
1962 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
1968 pLlcpSocket->psTransport);
1970 clearSendPending(pLlcpSocket->psTransport);
2055 if( testAndSetSendPending(pLlcpSocket->psTransport))
2067 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
2073 pLlcpSocket->psTransport);
2076 clearSendPending(pLlcpSocket->psTransport);
2250 if(testAndSetSendPending(pLlcpSocket->psTransport))
2268 clearSendPending(pLlcpSocket->psTransport);