/developtools/hdc/src/common/ |
H A D | session.cpp | 154 void HdcSessionBase::ClearOwnTasks(HSession hSession, const uint32_t channelIDInput) in ClearOwnTasks() argument 160 hSession->mapTaskMutex.lock(); in ClearOwnTasks() 162 for (iter = hSession->mapTask->begin(); iter != hSession->mapTask->end();) { in ClearOwnTasks() 172 hSession->sessionId, channelIDInput); in ClearOwnTasks() 173 iter = hSession->mapTask->erase(iter); in ClearOwnTasks() 178 iter = hSession->mapTask->erase(iter); in ClearOwnTasks() 180 hSession->mapTaskMutex.unlock(); in ClearOwnTasks() 188 HSession hSession = (HSession)v.second; in ClearSessions() local 189 if (!hSession in ClearSessions() 228 EnumUSBDeviceRegister(void (*pCallBack)(HSession hSession)) EnumUSBDeviceRegister() argument 367 MallocSessionByConnectType(HSession hSession) MallocSessionByConnectType() argument 424 HSession hSession = new(std::nothrow) HdcSession(); MallocSession() local 497 FreeSessionByConnectType(HSession hSession) FreeSessionByConnectType() argument 554 HSession hSession = (HSession)handle->data; FreeSessionFinally() local 574 FreeSessionContinue(HSession hSession) FreeSessionContinue() argument 606 HSession hSession = (HSession)handle->data; FreeSessionOpeate() local 652 HSession hSession = AdminSession(OP_QUERY, sessionId, nullptr); FreeSession() local 751 AdminTask(const uint8_t op, HSession hSession, const uint32_t channelId, HTaskInfo hInput) AdminTask() argument 788 SendByProtocol(HSession hSession, uint8_t *bufPtr, const int bufLen, bool echo) SendByProtocol() argument 835 HSession hSession = AdminSession(OP_QUERY, sessionId, nullptr); Send() local 890 DecryptPayload(HSession hSession, PayloadHead *payloadHeadBe, uint8_t *encBuf) DecryptPayload() argument 915 OnRead(HSession hSession, uint8_t *bufPtr, const int bufLen) OnRead() argument 947 FetchIOBuf(HSession hSession, uint8_t *ioBuf, int read) FetchIOBuf() argument 1000 HSession hSession = (HSession)req->handle->data; FinishWriteSessionTCP() local 1016 DispatchSessionThreadCommand(HSession hSession, const uint8_t *baseBuf, const int bytesIO) DispatchSessionThreadCommand() argument 1037 HSession hSession = (HSession)poll->data; ReadCtrlFromSession() local 1063 WorkThreadInitSession(HSession hSession, SessionHandShake &handshake) WorkThreadInitSession() argument 1077 WorkThreadStartSession(HSession hSession) WorkThreadStartSession() argument 1148 DispatchMainThreadCommand(HSession hSession, const CtrlStruct *ctrl) DispatchMainThreadCommand() argument 1208 HSession hSession = (HSession)poll->data; ReadCtrlFromMain() local 1241 ReChildLoopForSessionClear(HSession hSession) ReChildLoopForSessionClear() argument 1279 HSession hSession = (HSession)arg->data; SessionWorkThread() local 1351 DispatchTaskData(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, int payloadSize) DispatchTaskData() argument [all...] |
H A D | usb.cpp | 32 HSession hSession = (HSession)stream->data; in ReadUSB() local 33 HdcSessionBase *hSessionBase = (HdcSessionBase *)hSession->classInstance; in ReadUSB() 34 if (hSessionBase->FetchIOBuf(hSession, hSession->ioBuf, nread) < 0) { in ReadUSB() 35 WRITE_LOG(LOG_FATAL, "ReadUSB FetchIOBuf error sessionId:%u", hSession->sessionId); in ReadUSB() 36 hSessionBase->FreeSession(hSession->sessionId); in ReadUSB() 40 bool HdcUSBBase::ReadyForWorkThread(HSession hSession) in ReadyForWorkThread() argument 44 if (uv_tcp_init(&hSession->childLoop, &hSession->dataPipe[STREAM_WORK]) || in ReadyForWorkThread() 45 uv_tcp_open(&hSession in ReadyForWorkThread() 81 SendUSBBlock(HSession hSession, uint8_t *data, const int length) SendUSBBlock() argument 137 PreSendUsbSoftReset(HSession hSession, uint32_t sessionIdOld) PreSendUsbSoftReset() argument 153 CheckPacketOption(HSession hSession, uint8_t *appendData, int dataSize) CheckPacketOption() argument 180 SendToHdcStream(HSession hSession, uv_stream_t *stream, uint8_t *appendData, int dataSize) SendToHdcStream() argument [all...] |
H A D | session.h | 64 virtual void AttachChannel(HSession hSession, const uint32_t channelId) in AttachChannel() argument 67 virtual void DeatchChannel(HSession hSession, const uint32_t channelId) in DeatchChannel() argument 70 virtual void NotifyInstanceSessionFree(HSession hSession, bool freeOrClear) in NotifyInstanceSessionFree() argument 73 virtual bool RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uint32_t channelId, in RedirectToTask() argument 94 int OnRead(HSession hSession, uint8_t *bufPtr, const int bufLen); 97 int SendByProtocol(HSession hSession, uint8_t *bufPtr, const int bufLen, bool echo = false); 99 virtual int FetchIOBuf(HSession hSession, uint8_t *ioBuf, int read); 101 HTaskInfo AdminTask(const uint8_t op, HSession hSession, const uint32_t channelId, HTaskInfo hInput); 102 bool DispatchTaskData(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, 104 void EnumUSBDeviceRegister(void (*pCallBack)(HSession hSession)); 110 FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, int payloadSize) FetchCommand() argument [all...] |
H A D | usb.h | 24 virtual bool ReadyForWorkThread(HSession hSession); 25 virtual void CancelUsbIo(HSession hSession) {}; in CancelUsbIo() argument 26 int SendUSBBlock(HSession hSession, uint8_t *data, const int length); 29 virtual int SendUSBRaw(HSession hSession, uint8_t *data, const int length) in SendUSBRaw() argument 37 int SendToHdcStream(HSession hSession, uv_stream_t *stream, uint8_t *appendData, int dataSize); 49 int CheckPacketOption(HSession hSession, uint8_t *appendData, int dataSize); 50 void PreSendUsbSoftReset(HSession hSession, uint32_t sessionIdOld);
|
H A D | uart.cpp | 397 HSession hSession = (HSession)stream->data;
in UartToHdcProtocol() local 398 unsigned int fd = hSession->dataFd[STREAM_MAIN];
in UartToHdcProtocol() 441 RetErrCode HdcUARTBase::DispatchToWorkThread(HSession hSession, uint8_t *readBuf, int readBytes)
in DispatchToWorkThread() argument 443 if (hSession == nullptr) {
in DispatchToWorkThread() 446 if (!UartSendToHdcStream(hSession, readBuf, readBytes)) {
in DispatchToWorkThread() 452 size_t HdcUARTBase::PackageProcess(vector<uint8_t> &data, HSession hSession)
in PackageProcess() argument 473 if (hSession == nullptr) {
in PackageProcess() 475 hSession = GetSession(sessionId);
in PackageProcess() 478 hSession = GetSession(sessionId, true);
in PackageProcess() 481 if (hSession in PackageProcess() 525 SendUARTRaw(HSession hSession, uint8_t *data, const size_t length) SendUARTRaw() argument 567 UartSendToHdcStream(HSession hSession, uint8_t *data, size_t size) UartSendToHdcStream() argument 895 SendUARTData(HSession hSession, uint8_t *data, const size_t length) SendUARTData() argument 948 HSession hSession = (HSession)stream->data; ReadDataFromUARTStream() local 979 ReadyForWorkThread(HSession hSession) ReadyForWorkThread() argument 1007 StopSession(HSession hSession) StopSession() argument [all...] |
H A D | tcp.cpp | 72 HSession hSession = (HSession)tcp->data; in ReadStream() local 73 HdcTCPBase *thisClass = (HdcTCPBase *)hSession->classModule; in ReadStream() 89 if (hSessionBase->FetchIOBuf(hSession, hSession->ioBuf, nread) < 0) { in ReadStream() 99 hSessionBase->FreeSession(hSession->sessionId); in ReadStream()
|
H A D | task.cpp | 107 HdcSessionBase *hSession = (HdcSessionBase *)taskInfo->ownerSessionClass; in ServerCommand() local 108 return hSession->ServerCommand(taskInfo->sessionId, taskInfo->channelId, command, bufPtr, size); in ServerCommand() 115 HSession hSession = sessionBase->AdminSession(OP_QUERY, taskInfo->sessionId, nullptr); in ThreadCtrlCommunicate() local 116 if (!hSession) { in ThreadCtrlCommunicate() 117 WRITE_LOG(LOG_FATAL, "ThreadCtrlCommunicate hSession nullptr sessionId:%u", taskInfo->sessionId); in ThreadCtrlCommunicate() 120 int fd = hSession->ctrlFd[STREAM_WORK]; in ThreadCtrlCommunicate()
|
H A D | debug.cpp | 81 void DetermineThread(HSession hSession) in DetermineThread() argument 83 if (uv_thread_self() == hSession->hWorkThread) { in DetermineThread() 85 } else if (uv_thread_self() == hSession->hWorkChildThread) { in DetermineThread()
|
H A D | uart.h | 164 bool ReadyForWorkThread(HSession hSession);
165 int SendUARTData(HSession hSession, uint8_t *data, const size_t length);
168 virtual void StopSession(HSession hSession);
181 virtual bool SendUARTRaw(HSession hSession, uint8_t *data, const size_t length);
195 virtual bool UartSendToHdcStream(HSession hSession, uint8_t *data, size_t size);
207 virtual size_t PackageProcess(vector<uint8_t> &data, HSession hSession = nullptr);
208 virtual RetErrCode DispatchToWorkThread(HSession hSession, uint8_t *readBuf, int readBytes);
|
H A D | debug.h | 23 void DetermineThread(HSession hSession);
|
/developtools/hdc/src/host/ |
H A D | host_usb.cpp | 161 HSession hSession = hdcServer->MallocSession(true, CONN_USB, this); in DetectMyNeed() local 162 if (!hSession) { in DetectMyNeed() 166 hSession->connectKey = hUSB->serialNumber; in DetectMyNeed() 171 hdcServer->FreeSession(hSession->sessionId); in DetectMyNeed() 175 waitTimeDoCmd->data = hSession; in DetectMyNeed() 182 void HdcHostUSB::KickoutZombie(HSession hSession) in KickoutZombie() argument 184 HdcServer *ptrConnect = (HdcServer *)hSession->classInstance; in KickoutZombie() 185 HUSB hUSB = hSession->hUSB; in KickoutZombie() 187 WRITE_LOG(LOG_WARN, "KickoutZombie devHandle:%p isDead:%d", hUSB->devHandle, hSession->isDead); in KickoutZombie() 195 ptrConnect->FreeSession(hSession in KickoutZombie() 324 UpdateUSBDaemonInfo(HUSB hUSB, HSession hSession, uint8_t connStatus) UpdateUSBDaemonInfo() argument 438 CancelUsbIo(HSession hSession) CancelUsbIo() argument 465 HSession hSession = (HSession)stream->data; UsbToHdcProtocol() local 539 SubmitUsbBio(HSession hSession, bool sendOrRecv, uint8_t *buf, int bufSize) SubmitUsbBio() argument 578 BeginUsbRead(HSession hSession) BeginUsbRead() argument 659 SendUSBRaw(HSession hSession, uint8_t *data, const int length) SendUSBRaw() argument 728 ReadyForWorkThread(HSession hSession) ReadyForWorkThread() argument 735 ConnectDetectDaemon(const HSession hSession, const HDaemonInfo pdi) ConnectDetectDaemon() argument 776 SendSoftResetToDaemon(HSession hSession, uint32_t sessionIdOld) SendSoftResetToDaemon() argument [all...] |
H A D | host_tcp.cpp | 98 HSession hSession = (HSession)connection->data; in Connect() local 100 HdcSessionBase *ptrConnect = (HdcSessionBase *)hSession->classInstance; in Connect() 106 if ((hSession->fdChildWorkTCP = Base::DuplicateUvSocket(&hSession->hWorkTCP)) < 0) { in Connect() 107 WRITE_LOG(LOG_FATAL, "Connect fdChildWorkTCP:%d", hSession->fdChildWorkTCP); in Connect() 110 uv_read_stop((uv_stream_t *)&hSession->hWorkTCP); in Connect() 111 Base::SetTcpOptions((uv_tcp_t *)&hSession->hWorkTCP); in Connect() 113 Base::StartWorkThread(&ptrConnect->loopMain, ptrConnect->SessionWorkThread, Base::FinishWorkThread, hSession); in Connect() 115 while (hSession->childLoop.active_handles == 0) { in Connect() 118 Base::SendToPollFd(hSession in Connect() 136 HSession hSession = ptrConnect->MallocSession(true, CONN_TCP, this); ConnectDaemon() local [all...] |
H A D | host_uart.cpp | 44 bool HdcHostUART::NeedStop(const HSession hSession)
in NeedStop() argument 46 return (!uartOpened or (hSession->isDead and hSession->ref == 0));
in NeedStop() 75 void HdcHostUART::UartReadThread(HSession hSession)
in UartReadThread() argument 77 HUART hUART = hSession->hUART;
in UartReadThread() 83 if (NeedStop(hSession)) {
in UartReadThread() 90 OnTransferError(hSession);
in UartReadThread() 108 expectedSize = PackageProcess(dataReadBuf, hSession);
in UartReadThread() 417 void HdcHostUART::UpdateUARTDaemonInfo(const std::string &connectKey, HSession hSession,
in EnumSerialPort() argument 426 diNew.hSession in EnumSerialPort() 452 StartUartReadThread(HSession hSession) EnumSerialPort() argument 483 ConnectDaemonByUart(const HSession hSession, const HDaemonInfo) EnumSerialPort() argument 578 HSession hSession = server.MallocSession(true, CONN_SERIAL, this); EnumSerialPort() local 614 KickoutZombie(HSession hSession) EnumSerialPort() argument 691 StopSession(HSession hSession) EnumSerialPort() argument 770 SendUartSoftReset(HSession hSession, uint32_t sessionId) EnumSerialPort() argument [all...] |
H A D | host_usb.h | 26 int SendUSBRaw(HSession hSession, uint8_t *data, const int length) override; 27 HSession ConnectDetectDaemon(const HSession hSession, const HDaemonInfo pdi); 41 static void KickoutZombie(HSession hSession); 50 bool ReadyForWorkThread(HSession hSession) override; 54 void UpdateUSBDaemonInfo(HUSB hUSB, HSession hSession, uint8_t connStatus); 55 void BeginUsbRead(HSession hSession); 57 void CancelUsbIo(HSession hSession) override; 59 int SubmitUsbBio(HSession hSession, bool sendOrRecv, uint8_t *buf, int bufSize); 60 void SendSoftResetToDaemon(HSession hSession, uint32_t sessionIdOld);
|
H A D | server.cpp | 394 void HdcServer::NotifyInstanceSessionFree(HSession hSession, bool freeOrClear) in NotifyInstanceSessionFree() argument 397 AdminDaemonMap(OP_QUERY, hSession->connectKey, hdiOld); in NotifyInstanceSessionFree() 407 AdminDaemonMap(OP_UPDATE, hSession->connectKey, hdiNew); in NotifyInstanceSessionFree() 408 CleanForwardMap(hSession->sessionId); in NotifyInstanceSessionFree() 426 void HdcServer::GetDaemonAuthType(HSession hSession, SessionHandShake &handshake) in GetDaemonAuthType() argument 431 * Notice, If deamon is old version 'handshake.buf' will be 'hSession->tokenRSA', in GetDaemonAuthType() 432 * the length of hSession->tokenRSA less than min len(TLV_MIN_LEN), so there no in GetDaemonAuthType() 436 hSession->verifyType = AuthVerifyType::RSA_ENCRYPT; in GetDaemonAuthType() 438 WRITE_LOG(LOG_INFO, "the deamon maybe old version for %u session, so use rsa encrypt", hSession->sessionId); in GetDaemonAuthType() 443 WRITE_LOG(LOG_FATAL, "the buf is invalid for %u session, so use rsa encrypt", hSession in GetDaemonAuthType() 450 HandServerAuth(HSession hSession, SessionHandShake &handshake) HandServerAuth() argument 528 ServerSessionHandshake(HSession hSession, uint8_t *payload, int payloadSize) ServerSessionHandshake() argument 561 FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, const int payloadSize) FetchCommand() argument 746 HSession hSession = (HSession)handle->data; UsbPreConnect() local 773 HSession hSession = (HSession)handle->data; UartPreConnect() local 806 CreatConnectUart(HSession hSession) CreatConnectUart() argument 853 HSession hSession = nullptr; CreateConnect() local 893 AttachChannel(HSession hSession, const uint32_t channelId) AttachChannel() argument 920 DeatchChannel(HSession hSession, const uint32_t channelId) DeatchChannel() argument 964 HSession hSession = AdminSession(OP_QUERY, sessionId, nullptr); ServerCommand() local 972 RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, const int payloadSize) RedirectToTask() argument [all...] |
H A D | server.h | 24 bool FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, 32 void AttachChannel(HSession hSession, const uint32_t channelId) override; 33 void DeatchChannel(HSession hSession, const uint32_t channelId) override; 37 void NotifyInstanceSessionFree(HSession hSession, bool freeOrClear) override; 42 void CreatConnectUart(HSession hSession); 55 bool RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uint32_t channelId, const uint16_t command, 59 bool HandServerAuth(HSession hSession, SessionHandShake &handshake); 60 void GetDaemonAuthType(HSession hSession, SessionHandShake &handshake); 63 bool ServerSessionHandshake(HSession hSession, uint8_t *payload, int payloadSize);
|
H A D | host_uart.h | 39 HSession ConnectDaemonByUart(const HSession hSession,
44 void StopSession(HSession hSession) override;
62 virtual bool StartUartReadThread(HSession hSession);
64 size_t SendUARTDev(HSession hSession, uint8_t *data, const size_t length);
77 void KickoutZombie(HSession hSession);
78 virtual void UpdateUARTDaemonInfo(const std::string &connectKey, HSession hSession, ConnStatus connStatus);
89 virtual void SendUartSoftReset(HSession hSession, uint32_t sessionId) override;
93 virtual bool NeedStop(const HSession hSession);
94 virtual void UartReadThread(HSession hSession);
|
H A D | server_for_client.cpp | 217 if (!hdi->hSession) { in SendToDaemon() 218 WRITE_LOG(LOG_FATAL, "SendToDaemon hdi->hSession nullptr"); in SendToDaemon() 221 if (ptrServer->Send(hdi->hSession->sessionId, hChannel->channelId, commandFlag, bufPtr, bufSize) < 0) { in SendToDaemon() 353 (reinterpret_cast<HdcServer *>(ptrServer))->FreeSession(hdiOld->hSession->sessionId); in CommandRemoveSession() 373 HSession hSession = ptrServer->AdminSession(OP_QUERY, hfi->sessionId, nullptr); in RemoveFportkey() local 374 if (!hSession) { in RemoveFportkey() 375 WRITE_LOG(LOG_FATAL, "CommandRemoveForward hSession nullptr sessionId:%u", hfi->sessionId); in RemoveFportkey() 379 ptrServer->ClearOwnTasks(hSession, hfi->channelId); in RemoveFportkey() 587 HSession hSession = FindAliveSession(hChannel->targetSessionId); in TaskCommand() local 588 if (!hSession) { in TaskCommand() 700 HSession hSession = nullptr; FindAliveSessionFromDaemonMap() local 891 HSession hSession = ptrServer->AdminSession(OP_QUERY, sessionId, nullptr); FindAliveSession() local 902 HSession hSession = FindAliveSession(sessionId); ChannelSendSessionCtrlMsg() local [all...] |
/developtools/hdc/src/daemon/ |
H A D | daemon.cpp | 192 bool HdcDaemon::RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uint32_t channelId, in InitMod() argument 422 bool HdcDaemon::HandDaemonAuthInit(HSession hSession, const uint32_t channelId, SessionHandShake &handshake) in InitMod() argument 424 hSession->tokenRSA = Base::GetSecureRandomString(SHA_DIGEST_LENGTH); in InitMod() 429 * Notice, before here is "handshake.buf = hSession->tokenRSA", but the server not use it in InitMod() 431 if (hSession->verifyType == AuthVerifyType::RSA_3072_SHA512) { in InitMod() 434 WRITE_LOG(LOG_INFO, "client support RSA_3072_SHA512 auth for %u session", hSession->sessionId); in InitMod() 437 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, in InitMod() 441 InitSessionAuthInfo(hSession->sessionId, hSession->tokenRSA); in InitMod() 445 bool HdcDaemon::HandDaemonAuthPubkey(HSession hSession, cons in InitMod() argument 499 RsaSignVerify(HSession hSession, EVP_PKEY_CTX *ctx, const string &tokenSignBase64, const string &token) InitMod() argument 525 AuthVerifyRsaSign(HSession hSession, const string &tokenSign, const string &token, RSA *rsa) InitMod() argument 576 AuthVerify(HSession hSession, const string &encryptToken, const string &token, const string &pubkey) InitMod() argument 616 AuthVerifyRsa(HSession hSession, const string &encryptToken, const string &token, RSA *rsa) InitMod() argument 645 HandDaemonAuthSignature(HSession hSession, const uint32_t channelId, SessionHandShake &handshake) InitMod() argument 678 HandDaemonAuth(HSession hSession, const uint32_t channelId, SessionHandShake &handshake) InitMod() argument 715 GetServerCapability(HSession &hSession, SessionHandShake &handshake) InitMod() argument 734 DaemonSessionHandshakeInit(HSession &hSession, SessionHandShake &handshake) InitMod() argument 761 DaemonSessionHandshake(HSession hSession, const uint32_t channelId, uint8_t *payload, int payloadSize) InitMod() argument 867 FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, const int payloadSize) InitMod() argument 985 NotifyInstanceSessionFree(HSession hSession, bool freeOrClear) InitMod() argument [all...] |
H A D | daemon_uart.cpp | 167 HSession hSession = daemon.AdminSession(OP_QUERY, sessionId, nullptr);
in ResetOldSession() local 168 if (hSession == nullptr) {
in ResetOldSession() 171 if (hSession->hUART != nullptr) {
in ResetOldSession() 172 hSession->hUART->resetIO = true;
in ResetOldSession() 176 OnTransferError(hSession);
in ResetOldSession() 181 HSession hSession = daemon.AdminSession(OP_QUERY, sessionId, nullptr);
in GetSession() local 182 if (hSession == nullptr and create) {
in GetSession() 183 hSession = PrepareNewSession(sessionId);
in GetSession() 185 return hSession;
in GetSession() 206 HSession hSession in PrepareNewSession() local 314 IsSendReady(HSession hSession) IsSendReady() argument [all...] |
H A D | daemon.h | 51 bool FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, 68 bool RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uint32_t channelId, const uint16_t command, 73 bool HandDaemonAuth(HSession hSession, const uint32_t channelId, SessionHandShake &handshake); 78 void DaemonSessionHandshakeInit(HSession &hSession, SessionHandShake &handshake); 79 void GetServerCapability(HSession &hSession, SessionHandShake &handshake); 80 bool DaemonSessionHandshake(HSession hSession, const uint32_t channelId, uint8_t *payload, int payloadSize); 84 bool HandDaemonAuthInit(HSession hSession, const uint32_t channelId, SessionHandShake &handshake); 85 bool HandDaemonAuthPubkey(HSession hSession, const uint32_t channelId, SessionHandShake &handshake); 86 bool HandDaemonAuthSignature(HSession hSession, const uint32_t channelId, SessionHandShake &handshake); 91 void NotifyInstanceSessionFree(HSession hSession, boo [all...] |
H A D | daemon_tcp.cpp | 75 HSession hSession = ptrConnect->MallocSession(false, CONN_TCP, thisClass); in AcceptClient() local 76 if (!hSession) { in AcceptClient() 80 if (uv_accept(server, (uv_stream_t *)&hSession->hWorkTCP) < 0) { in AcceptClient() 81 WRITE_LOG(LOG_FATAL, "uv_accept error sessionId:%u", hSession->sessionId); in AcceptClient() 84 if ((hSession->fdChildWorkTCP = Base::DuplicateUvSocket(&hSession->hWorkTCP)) < 0) { in AcceptClient() 85 WRITE_LOG(LOG_FATAL, "AcceptClient error fdChildWorkTCP:%d,errno:%d", hSession->fdChildWorkTCP, errno); in AcceptClient() 88 Base::TryCloseHandle((uv_handle_t *)&hSession->hWorkTCP); in AcceptClient() 89 Base::StartWorkThread(ptrLoop, ptrConnect->SessionWorkThread, Base::FinishWorkThread, hSession); in AcceptClient() 91 while (hSession in AcceptClient() [all...] |
H A D | daemon_bridge.cpp | 76 HSession hSession = ptrConnect->MallocSession(false, CONN_TCP, thisClass); in AcceptClient() local 77 if (!hSession) { in AcceptClient() 91 hSession->fdChildWorkTCP = (uv_os_sock_t)newClientFd; in AcceptClient() 92 Base::StartWorkThread(ptrLoop, ptrConnect->SessionWorkThread, Base::FinishWorkThread, hSession); in AcceptClient() 94 while (hSession->childLoop.active_handles == 0) { in AcceptClient() 98 Base::SendToPollFd(hSession->ctrlFd[STREAM_MAIN], ctrl.data(), ctrl.size()); in AcceptClient() 104 ptrConnect->FreeSession(hSession->sessionId); in AcceptClient()
|
H A D | daemon_usb.cpp | 223 HSession hSession = daemon->AdminSession(OP_QUERY, sessionId, nullptr); in ResetOldSession() local 224 if (hSession == nullptr) { in ResetOldSession() 225 WRITE_LOG(LOG_FATAL, "ResetOldSession hSession nullptr sessionId:%u", sessionId); in ResetOldSession() 229 hSession->isSoftReset = isSoftReset; in ResetOldSession() 260 bool HdcDaemonUSB::ReadyForWorkThread(HSession hSession) in ReadyForWorkThread() argument 262 HdcUSBBase::ReadyForWorkThread(hSession); in ReadyForWorkThread() 298 int HdcDaemonUSB::SendUSBIOSync(HSession hSession, HUSB hMainUSB, const uint8_t *data, const int length) in SendUSBIOSync() argument 305 while (modRunning && isAlive && !hSession->isDead) { in SendUSBIOSync() 328 length, offset, modRunning, isAlive, hSession->isDead); in SendUSBIOSync() 333 int HdcDaemonUSB::SendUSBRaw(HSession hSession, uint8_ argument 360 OnSessionFreeFinally(const HSession hSession) OnSessionFreeFinally() argument [all...] |
H A D | daemon_usb.h | 26 int SendUSBRaw(HSession hSession, uint8_t *data, const int length) override; 28 void OnSessionFreeFinally(const HSession hSession); 48 bool ReadyForWorkThread(HSession hSession) override; 52 int SendUSBIOSync(HSession hSession, HUSB hMainUSB, const uint8_t *data, const int length);
|