• Home
  • Raw
  • Download

Lines Matching refs:hSession

397 void HdcServer::NotifyInstanceSessionFree(HSession hSession, bool freeOrClear)  in NotifyInstanceSessionFree()  argument
400 AdminDaemonMap(OP_QUERY, hSession->connectKey, hdiOld); in NotifyInstanceSessionFree()
410 AdminDaemonMap(OP_UPDATE, hSession->connectKey, hdiNew); in NotifyInstanceSessionFree()
411 CleanForwardMap(hSession->sessionId); in NotifyInstanceSessionFree()
429 bool HdcServer::HandServerAuth(HSession hSession, SessionHandShake &handshake) in HandServerAuth() argument
441 Send(hSession->sessionId, 0, CMD_KERNEL_HANDSHAKE, in HandServerAuth()
455 Send(hSession->sessionId, 0, CMD_KERNEL_HANDSHAKE, in HandServerAuth()
466 bool HdcServer::ServerSessionHandshake(HSession hSession, uint8_t *payload, int payloadSize) in ServerSessionHandshake() argument
486 if (!HandServerAuth(hSession, handshake)) { in ServerSessionHandshake()
494 AdminDaemonMap(OP_QUERY, hSession->connectKey, hdiOld); in ServerSessionHandshake()
509 AdminDaemonMap(OP_UPDATE, hSession->connectKey, hdiNew); in ServerSessionHandshake()
510 hSession->handshakeOK = true; in ServerSessionHandshake()
515 bool HdcServer::FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, u… in FetchCommand() argument
521 ret = ServerSessionHandshake(hSession, payload, payloadSize); in FetchCommand()
523 hSession->connType); in FetchCommand()
538 Send(hSession->sessionId, channelId, CMD_KERNEL_CHANNEL_CLOSE, &flag, 1); in FetchCommand()
561 ClearOwnTasks(hSession, channelId); in FetchCommand()
566 Send(hSession->sessionId, channelId, CMD_KERNEL_CHANNEL_CLOSE, payload, 1); in FetchCommand()
576 pdiNew->sessionId = hSession->sessionId; in FetchCommand()
577 pdiNew->connectKey = hSession->connectKey; in FetchCommand()
701 HSession hSession = (HSession)handle->data; in UsbPreConnect() local
703 HdcServer *hdcServer = (HdcServer *)hSession->classInstance; in UsbPreConnect()
707 if (hSession->connectKey == "any") { in UsbPreConnect()
708 hdcServer->AdminDaemonMap(OP_GET_ANY, hSession->connectKey, pDi); in UsbPreConnect()
710 hdcServer->AdminDaemonMap(OP_QUERY, hSession->connectKey, pDi); in UsbPreConnect()
715 HdcHostUSB *hdcHostUSB = (HdcHostUSB *)hSession->classModule; in UsbPreConnect()
716 hdcHostUSB->ConnectDetectDaemon(hSession, pDi); in UsbPreConnect()
728 HSession hSession = (HSession)handle->data; in UartPreConnect() local
730 HdcServer *hdcServer = (HdcServer *)hSession->classInstance; in UartPreConnect()
733 if (hSession->hUART->retryCount > uartConnectRetryMax) { in UartPreConnect()
735 hSession->hUART->retryCount); in UartPreConnect()
736 hdcServer->FreeSession(hSession->sessionId); in UartPreConnect()
740 hSession->hUART->retryCount++; in UartPreConnect()
743 WRITE_LOG(LOG_DEBUG, "%s query %s", __FUNCTION__, hSession->ToDebugString().c_str()); in UartPreConnect()
744 hdcServer->AdminDaemonMap(OP_QUERY, hSession->connectKey, pDi); in UartPreConnect()
749 HdcHostUART *hdcHostUART = (HdcHostUART *)hSession->classModule; in UartPreConnect()
750 hdcHostUART->ConnectDaemonByUart(hSession, pDi); in UartPreConnect()
761 void HdcServer::CreatConnectUart(HSession hSession) in CreatConnectUart() argument
769 waitTimeDoCmd->data = hSession; in CreatConnectUart()
808 HSession hSession = nullptr; in CreateConnect() local
810 hSession = clsTCPClt->ConnectDaemon(connectKey, isCheck); in CreateConnect()
814 hSession = clsUARTClt->ConnectDaemon(connectKey); in CreateConnect()
817 hSession = MallocSession(true, CONN_USB, clsUSBClt); in CreateConnect()
818 if (!hSession) { in CreateConnect()
822 hSession->connectKey = connectKey; in CreateConnect()
826 FreeSession(hSession->sessionId); in CreateConnect()
830 waitTimeDoCmd->data = hSession; in CreateConnect()
833 if (!hSession) { in CreateConnect()
841 diNew.hSession = hSession; in CreateConnect()
848 void HdcServer::AttachChannel(HSession hSession, const uint32_t channelId) in AttachChannel() argument
856 uv_tcp_init(&hSession->childLoop, &hChannel->hChildWorkTCP); in AttachChannel()
858 hChannel->targetSessionId = hSession->sessionId; in AttachChannel()
874 void HdcServer::DeatchChannel(HSession hSession, const uint32_t channelId) in DeatchChannel() argument
887 ClearOwnTasks(hSession, channelId); in DeatchChannel()
889 Send(hSession->sessionId, hChannel->channelId, CMD_KERNEL_CHANNEL_CLOSE, &count, 1); in DeatchChannel()
891 …Base::DoNextLoop(&hSession->childLoop, hChannel, [](const uint8_t flag, string &msg, const void *d… in DeatchChannel()
910 HSession hSession = AdminSession(OP_QUERY, sessionId, nullptr); in ServerCommand() local
911 if (!hChannel || !hSession) { in ServerCommand()
914 return FetchCommand(hSession, channelId, command, bufPtr, size); in ServerCommand()
918 bool HdcServer::RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uint32_t channelId, in RedirectToTask() argument