diff --git a/src/common/auth.cpp b/src/common/auth.cpp index 505f16ec5aa8ed093a7e3b0d5924a85beec3a688..61047472592d13788cdd307c16b63ffb824871eb 100644 --- a/src/common/auth.cpp +++ b/src/common/auth.cpp @@ -31,26 +31,26 @@ namespace HdcAuth { // ---------------------------------------Cheat compiler--------------------------------------------------------- #ifdef HDC_HOST -bool AuthVerify(uint8_t *token, uint8_t *sig, int siglen) +bool AuthVerify(uint8_t* /*token */, uint8_t* /* sig */, int /* siglen */) { return false; }; -bool PostUIConfirm(string publicKey) +bool PostUIConfirm(string /* publicKey */) { return false; } #else // daemon -bool GenerateKey(const char *file) +bool GenerateKey(const char* /* file */) { return false; }; -int AuthSign(void *rsa, const unsigned char *token, size_t tokenSize, void *sig) +int AuthSign(void* /* rsa */, const unsigned char* /* token */, size_t /* tokenSize */, void* /* sig */) { return 0; }; -int GetPublicKeyFileBuf(unsigned char *data, size_t len) +int GetPublicKeyFileBuf(unsigned char* /* data */, size_t /* len */) { return 0; } diff --git a/src/common/channel.h b/src/common/channel.h index b994966dac1463cb71f4c57c8a6856997850ed5b..876453d9ed3a02a3ca93843c7882b6092c681fc4 100644 --- a/src/common/channel.h +++ b/src/common/channel.h @@ -42,16 +42,16 @@ protected: char version[BUF_SIZE_TINY] = { 0 }; } __attribute__((packed)); uint32_t MallocChannel(HChannel *hOutChannel); - virtual int ReadChannel(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) + virtual int ReadChannel(HChannel /* hChannel */, uint8_t* /* bufPtr */, const int /* bytesIO */) { return 0; } - virtual void NotifyInstanceChannelFree(HChannel hChannel) {}; + virtual void NotifyInstanceChannelFree(HChannel /* hChannel */) {}; void Send(const uint32_t channelId, uint8_t *bufPtr, const int size); void SendChannel(HChannel hChannel, uint8_t *bufPtr, const int size, const uint16_t commandFlag = 0); void SendChannelWithCmd(HChannel hChannel, const uint16_t commandFlag, uint8_t *bufPtr, const int size); void EchoToClient(HChannel hChannel, uint8_t *bufPtr, const int size); - virtual bool ChannelSendSessionCtrlMsg(vector &ctrlMsg, uint32_t sessionId) + virtual bool ChannelSendSessionCtrlMsg(vector& /* ctrlMsg */, uint32_t /* sessionId */) { return true; // just server use } diff --git a/src/common/forward.h b/src/common/forward.h index 825ca1d259ffc3a91be51646368fd1a2425be20e..afbfd504ef7a1676b324a2d2e347ff39c7b8ce1c 100644 --- a/src/common/forward.h +++ b/src/common/forward.h @@ -64,11 +64,11 @@ protected: uint8_t *bufIO; }; - virtual bool SetupJdwpPoint(HCtxForward ctxPoint) + virtual bool SetupJdwpPoint(HCtxForward /* ctxPoint */) { return false; } - virtual bool SetupArkPoint(HCtxForward ctxPoint) + virtual bool SetupArkPoint(HCtxForward /* ctxPoint */) { return false; } diff --git a/src/common/serial_struct_define.h b/src/common/serial_struct_define.h index 9115eaced6efe01cad942dc6c8c05ba5d3d86065..1e48866dac1c3d255c027d8b97e15bbf2a2ecae6 100644 --- a/src/common/serial_struct_define.h +++ b/src/common/serial_struct_define.h @@ -747,20 +747,22 @@ namespace SerialStruct { }; template<> struct Serializer { - static void Serialize(uint32_t tag, int32_t value, FlagsType<>, Writer &out, bool force = false) + static void Serialize(uint32_t tag, int32_t value, FlagsType<>, Writer &out, + [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::VARINT, out); SerialDetail::WriteVarint(value, out); } - static void Serialize(uint32_t tag, int32_t value, FlagsType, Writer &out, bool force = false) + static void Serialize(uint32_t tag, int32_t value, FlagsType, Writer &out, + [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::VARINT, out); SerialDetail::WriteSignedVarint(value, out); } - static void Serialize( - uint32_t tag, int32_t value, FlagsType, Writer &out, bool force = false) + static void Serialize(uint32_t tag, int32_t value, FlagsType, Writer &out, + [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::FIXED32, out); SerialDetail::WriteSignedFixed(value, out); @@ -819,13 +821,15 @@ namespace SerialStruct { }; template<> struct Serializer { - static void Serialize(uint32_t tag, uint32_t value, FlagsType<>, Writer &out, bool force = false) + static void Serialize(uint32_t tag, uint32_t value, FlagsType<>, Writer &out, + [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::VARINT, out); SerialDetail::WriteVarint(value, out); } - static void Serialize(uint32_t tag, uint32_t value, FlagsType, Writer &out, bool force = false) + static void Serialize(uint32_t tag, uint32_t value, FlagsType, Writer &out, + [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::FIXED32, out); SerialDetail::WriteFixed(value, out); @@ -867,20 +871,22 @@ namespace SerialStruct { }; template<> struct Serializer { - static void Serialize(uint32_t tag, int64_t value, FlagsType<>, Writer &out, bool force = false) + static void Serialize(uint32_t tag, int64_t value, FlagsType<>, Writer &out, + [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::VARINT, out); SerialDetail::WriteVarint(value, out); } - static void Serialize(uint32_t tag, int64_t value, FlagsType, Writer &out, bool force = false) + static void Serialize(uint32_t tag, int64_t value, FlagsType, Writer &out, + [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::VARINT, out); SerialDetail::WriteSignedVarint(value, out); } - static void Serialize( - uint32_t tag, int64_t value, FlagsType, Writer &out, bool force = false) + static void Serialize(uint32_t tag, int64_t value, FlagsType, + Writer &out, [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::FIXED64, out); SerialDetail::WriteSignedFixed(value, out); @@ -939,7 +945,8 @@ namespace SerialStruct { }; template<> struct Serializer { - static void Serialize(uint32_t tag, uint64_t value, FlagsType<>, Writer &out, bool force = false) + static void Serialize(uint32_t tag, uint64_t value, FlagsType<>, Writer &out, + [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::VARINT, out); SerialDetail::WriteVarint(value, out); @@ -1114,7 +1121,8 @@ namespace SerialStruct { }; template<> struct Serializer { - static void Serialize(uint32_t tag, const std::string &value, FlagsType<>, Writer &out, bool force = false) + static void Serialize(uint32_t tag, const std::string &value, FlagsType<>, Writer &out, + [[maybe_unused]] bool force = false) { SerialDetail::WriteTagWriteType(tag, WireType::LENGTH_DELIMETED, out); SerialDetail::WriteVarint(value.size(), out); diff --git a/src/common/session.h b/src/common/session.h index 9130ab3a77db2877545ef2c4a828f8256d4948a8..718bcf5d16607b0cf3d15cc34639bd267ecabb5a 100755 --- a/src/common/session.h +++ b/src/common/session.h @@ -66,17 +66,18 @@ public: HdcSessionBase(bool serverOrDaemonIn, size_t uvThreadSize = SIZE_THREAD_POOL); virtual ~HdcSessionBase(); - virtual void AttachChannel(HSession hSession, const uint32_t channelId) + virtual void AttachChannel(HSession /* hSession */, const uint32_t /* channelId */) { } - virtual void DeatchChannel(HSession hSession, const uint32_t channelId) + virtual void DeatchChannel(HSession /* hSession */, const uint32_t /* channelId */) { } - virtual void NotifyInstanceSessionFree(HSession hSession, bool freeOrClear) + virtual void NotifyInstanceSessionFree(HSession /* hSession */, bool /* freeOrClear */) { } - virtual bool RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uint32_t channelId, - const uint16_t command, uint8_t *payload, const int payloadSize) + virtual bool RedirectToTask(HTaskInfo /* hTaskInfo */, HSession /* hSession */, + const uint32_t /* channelId */, const uint16_t /* command */, + uint8_t* /* payload */, const int /* payloadSize */) { return true; } @@ -119,17 +120,17 @@ public: virtual void EnumUARTDeviceRegister(UartKickoutZombie); #endif void ClearOwnTasks(HSession hSession, const uint32_t channelIDInput); - virtual bool FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, - int payloadSize) + virtual bool FetchCommand(HSession /* hSession */, const uint32_t /* channelId */, + const uint16_t /* command */, uint8_t* /* payload */, int /* payloadSize */) { return true; } - virtual bool ServerCommand(const uint32_t sessionId, const uint32_t channelId, const uint16_t command, - uint8_t *bufPtr, const int size) + virtual bool ServerCommand(const uint32_t /* sessionId */, const uint32_t /* channelId */, + const uint16_t /* command */, uint8_t* /* bufPtr */, const int /* size */) { return true; } - virtual bool RemoveInstanceTask(const uint8_t op, HTaskInfo hTask) + virtual bool RemoveInstanceTask(const uint8_t /* op */, HTaskInfo /* hTask */) { return true; } @@ -159,7 +160,7 @@ protected: void PrintSession(const uint32_t sessionId); #endif HSession VoteReset(const uint32_t sessionId); - virtual void JdwpNewFileDescriptor(const uint8_t *buf, const int bytesIO) + virtual void JdwpNewFileDescriptor(const uint8_t* /* buf */, const int /* bytesIO */) { } // must be define in haderfile, cannot in cpp file diff --git a/src/common/task.h b/src/common/task.h index f7b0ea233393024ab457f3aa2f5b12244df82e2e..ead5e6d31feb318626b673c4e0354b5dc002b781 100644 --- a/src/common/task.h +++ b/src/common/task.h @@ -22,7 +22,7 @@ class HdcTaskBase { public: HdcTaskBase(HTaskInfo hTaskInfo); virtual ~HdcTaskBase(); - virtual bool CommandDispatch(const uint16_t command, uint8_t *payload, const int payloadSize) + virtual bool CommandDispatch(const uint16_t /* command */, uint8_t* /* payload */, const int /* payloadSize */) { return true; } diff --git a/src/common/tcp.h b/src/common/tcp.h index 6f86752dbf0c75f4c17e4532306a8b73e07801dd..25e54d11b3146c6b212510f6e59e280beb415798 100644 --- a/src/common/tcp.h +++ b/src/common/tcp.h @@ -26,7 +26,7 @@ public: int WriteUvTcpFd(uv_tcp_t *tcp, uint8_t *buf, int size); protected: - virtual void RecvUDPEntry(const sockaddr *addrSrc, uv_udp_t *handle, const uv_buf_t *rcvbuf) + virtual void RecvUDPEntry(const sockaddr* /* addrSrc */, uv_udp_t* /* handle */, const uv_buf_t* /* rcvbuf */) { } static void RecvUDP( diff --git a/src/common/transfer.h b/src/common/transfer.h index c9a11eeb2e5687cf5b4d71f826975e1e72bfdb47..75bc204eecc65a49a27d17014a3f69f4dba5e5e2 100644 --- a/src/common/transfer.h +++ b/src/common/transfer.h @@ -129,10 +129,10 @@ protected: bool CheckSandboxOptionCompatibility(const string &option, CtxFile *context); int GetSubFiles(const char *path, string filter, vector *out); int GetSubFilesRecursively(string path, string currentDirname, vector *out); - virtual void CheckMaster(CtxFile *context) + virtual void CheckMaster(CtxFile* /* context */) { } - virtual void WhenTransferFinish(CtxFile *context) + virtual void WhenTransferFinish(CtxFile* /* context */) { } bool MatchPackageExtendName(string fileName, string extName); diff --git a/src/common/uart.h b/src/common/uart.h index f50c942e81d36db672553845a68de6a49a9fe23f..816684e140480f1d85a35914e52625ab47cf5135 100644 --- a/src/common/uart.h +++ b/src/common/uart.h @@ -179,11 +179,11 @@ protected: // review how about make a HUART in daemon side and put the devhandle in it ? int uartHandle = -1; virtual bool SendUARTRaw(HSession hSession, uint8_t *data, const size_t length); - virtual void SendUartSoftReset(HSession hUART, uint32_t sessionId) {}; + virtual void SendUartSoftReset(HSession /* hUART */, uint32_t /* sessionId */) {}; virtual RetErrCode ValidateUartPacket(vector &data, uint32_t &sessionId, uint32_t &packageIndex, size_t &fullPackageLength); virtual void NotifyTransfer(); - virtual void ResetOldSession(uint32_t sessionId) + virtual void ResetOldSession(uint32_t /* sessionId */) { return; } diff --git a/src/common/usb.h b/src/common/usb.h index 69676573a0277f02094968092623b6d24d3f2079..7e347a7013cf6fa0deb3d76a5ee0e3fc18cdf0c1 100644 --- a/src/common/usb.h +++ b/src/common/usb.h @@ -22,15 +22,15 @@ public: HdcUSBBase(const bool serverOrDaemonIn, void *ptrMainBase); virtual ~HdcUSBBase(); virtual bool ReadyForWorkThread(HSession hSession); - virtual void CancelUsbIo(HSession hSession) {}; + virtual void CancelUsbIo(HSession /* hSession */) {}; int SendUSBBlock(HSession hSession, uint8_t *data, const int length); protected: - virtual int SendUSBRaw(HSession hSession, uint8_t *data, const int length) + virtual int SendUSBRaw(HSession /* hSession */, uint8_t* /* data */, const int /* length */) { return 0; } - virtual int UsbToHdcProtocol(uv_stream_t *stream, uint8_t *appendData, int dataSize) + virtual int UsbToHdcProtocol(uv_stream_t* /* stream */, uint8_t* /* appendData */, int /* dataSize */) { return 0; }; diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index d6ce4aaa21c130ff5b8b06ac752baabf8d74f7cf..50a38cad84115efec9027b37676e7ece1b0ad65c 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -224,7 +224,7 @@ void HdcDaemon::InitMod(bool bEnableTCP, bool bEnableUSB, bool bEnableBridge) #endif // clang-format off -bool HdcDaemon::RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uint32_t channelId, +bool HdcDaemon::RedirectToTask(HTaskInfo hTaskInfo, HSession /* hSession */, const uint32_t /* channelId */, const uint16_t command, uint8_t *payload, const int payloadSize) { StartTraceScope("HdcDaemon::RedirectToTask"); diff --git a/src/host/client.cpp b/src/host/client.cpp index d168af57d6f3db8ddb745bb95826277d88b34dcd..c944ce193bc3cab9066a6707f962f5c0547f46ce 100755 --- a/src/host/client.cpp +++ b/src/host/client.cpp @@ -116,14 +116,6 @@ bool HdcClient::StartServer(const string &cmd) return true; } -void HdcClient::ChannelCtrlServerStart(const char *listenString) -{ - Base::PrintMessage("hdc start server, listening: %s", channelHostPort.c_str()); - HdcServer::PullupServer(channelHostPort.c_str()); - uv_sleep(START_CMD_WAIT_TIME); - ExecuteCommand(CMDSTR_SERVICE_START.c_str()); -} - bool HdcClient::ChannelCtrlServer(const string &cmd, string &connectKey) { // new version build channle to send Ctrl command to server diff --git a/src/host/client.h b/src/host/client.h index f6d88bc37b1babdb5a90a9926d1ef40d61f824d7..b2a38d28a3cf6da23537a3e474ac2f42550a18f9 100755 --- a/src/host/client.h +++ b/src/host/client.h @@ -52,7 +52,6 @@ private: uint32_t GetLastPID(); bool StartServer(const string &cmd); bool KillServer(const string &cmd); - void ChannelCtrlServerStart(const char *listenString); void BindLocalStd(); void BindLocalStd(HChannel hChannel); void ModifyTty(bool setOrRestore, uv_tty_t *tty); diff --git a/src/host/ext_client.cpp b/src/host/ext_client.cpp index 0ae7bc25844b1b2c317e4b13abe45f8424b1c553..4ca1f015968476afc81782d57f354a00c3c6cea4 100644 --- a/src/host/ext_client.cpp +++ b/src/host/ext_client.cpp @@ -116,7 +116,7 @@ void ExtClient::Version(const std::string &str) Handle(str, name); } -void ExtClient::Help(const std::string &str) +void ExtClient::Help(const std::string& /* str */) { return; } @@ -364,7 +364,7 @@ void ExtClient::WaitForExtent(const std::string &str) uv_dlclose(&uvLib); } -static void OnExit(uv_process_t *req, int64_t exitStatus, int termSignal) +static void OnExit(uv_process_t *req, int64_t /* exitStatus */, int /* termSignal */) { uv_close((uv_handle_t*) req, nullptr); } diff --git a/src/host/host_app.cpp b/src/host/host_app.cpp index 1cd08a772175fb7cc9e5d8982146c371c1688e63..9bb9f4c2e012deb65bd30b10660cd52cddd81489 100644 --- a/src/host/host_app.cpp +++ b/src/host/host_app.cpp @@ -151,7 +151,7 @@ void HdcHostApp::CheckMaster(CtxFile *context) bufString.size()); } -bool HdcHostApp::CheckInstallContinue(AppModType mode, bool lastResult, const char *msg) +bool HdcHostApp::CheckInstallContinue(AppModType mode, const char *msg) { string modeDesc; switch (mode) { @@ -204,9 +204,8 @@ bool HdcHostApp::CommandDispatch(const uint16_t command, uint8_t *payload, const } case CMD_APP_FINISH: { AppModType mode = static_cast(payload[0]); - bool result = static_cast(payload[1]); string s(reinterpret_cast(payload + cmdOffset), payloadSize - cmdOffset); - ret = CheckInstallContinue(mode, result, s.c_str()); + ret = CheckInstallContinue(mode, s.c_str()); break; } case CMD_APP_UNINSTALL: { diff --git a/src/host/host_app.h b/src/host/host_app.h index 2d29795750c60f129f4a2351f325183c7bf16d87..79b0694d3307579387fd3a309e2c67f7f48a22f4 100644 --- a/src/host/host_app.h +++ b/src/host/host_app.h @@ -26,7 +26,7 @@ public: private: bool BeginInstall(CtxFile *context, const char *command); void CheckMaster(CtxFile *context) override; - bool CheckInstallContinue(AppModType mode, bool lastResult, const char *msg); + bool CheckInstallContinue(AppModType mode, const char *msg); bool RunQueue(CtxFile *context); bool BeginSideload(CtxFile *context, const char *localPath); string Dir2Tar(const char *dir); diff --git a/src/host/host_tcp.cpp b/src/host/host_tcp.cpp index f0af20db1f3e7c185b406dd8bd81dd5d5a93ad92..2a99fcc730cb9052ba8edb6509c312bb8b4bc7ce 100644 --- a/src/host/host_tcp.cpp +++ b/src/host/host_tcp.cpp @@ -31,7 +31,7 @@ void HdcHostTCP::Stop() { } -void HdcHostTCP::RecvUDPEntry(const sockaddr *addrSrc, uv_udp_t *handle, const uv_buf_t *rcvbuf) +void HdcHostTCP::RecvUDPEntry(const sockaddr *addrSrc, uv_udp_t* /* handle */, const uv_buf_t *rcvbuf) { char bufString[BUF_SIZE_TINY]; int port = 0; diff --git a/src/host/host_tcp.h b/src/host/host_tcp.h index be7ba509419fbf887172c237043f4b7c7eb5da02..30f60de42541186bfda0c6c377b9d8f3d4b47da4 100644 --- a/src/host/host_tcp.h +++ b/src/host/host_tcp.h @@ -30,7 +30,7 @@ private: static void BroadcastTimer(uv_idle_t *handle); static void Connect(uv_connect_t *connection, int status); void BroadcastFindDaemon(const char *broadcastLanIP); - void RecvUDPEntry(const sockaddr *addrSrc, uv_udp_t *handle, const uv_buf_t *rcvbuf) override; + void RecvUDPEntry(const sockaddr *addrSrc, uv_udp_t* /* handle */, const uv_buf_t *rcvbuf) override; bool broadcastFindWorking; }; diff --git a/src/host/host_updater.cpp b/src/host/host_updater.cpp index dcf0a51ed7b18934fcc2e2abbbcc1e5202ff4db8..95190f9ebe080ae1959aca76e33071b2406237b4 100755 --- a/src/host/host_updater.cpp +++ b/src/host/host_updater.cpp @@ -203,7 +203,7 @@ bool HostUpdater::CommandDispatch(const uint16_t command, uint8_t *payload, cons ret = BeginTransfer(CMDSTR_FLASHD_FLASH, payload, payloadSize, FLASH_PARAM_MIN_COUNT, FLASH_FILE_INDEX); break; case CMD_FLASHD_FINISH: - ret = CheckUpdateContinue(command, payload, payloadSize); + ret = CheckUpdateContinue(payload, payloadSize); break; case CMD_FLASHD_ERASE: ret = CheckCmd(CMD_FLASHD_ERASE, payload, payloadSize, ERASE_PARAM_MIN_COUNT); @@ -238,7 +238,7 @@ void HostUpdater::ProcessProgress(uint8_t percentage) } } -bool HostUpdater::CheckUpdateContinue(const uint16_t command, const uint8_t *payload, int payloadSize) +bool HostUpdater::CheckUpdateContinue(const uint8_t *payload, int payloadSize) { if (static_cast(payloadSize) < sizeof(uint16_t)) { return false; diff --git a/src/host/host_updater.h b/src/host/host_updater.h index ef0b36ad4904bda44437a3dfe9c7b256b4849ea1..7cc1fad8ce4492a982eea5ed10028fcdb6cf698b 100755 --- a/src/host/host_updater.h +++ b/src/host/host_updater.h @@ -34,7 +34,7 @@ protected: private: bool BeginTransfer(const std::string &function, const uint8_t *payload, int payloadSize, size_t minParam, size_t fileIndex); - bool CheckUpdateContinue(const uint16_t command, const uint8_t *payload, int payloadSize); + bool CheckUpdateContinue(const uint8_t *payload, int payloadSize); bool RunQueue(CtxFile &context); void ProcessProgress(uint8_t percentage); void SendRawData(std::string rawData) const; diff --git a/src/host/server.cpp b/src/host/server.cpp index ffde9a6352146826c8b8b4721536e228fef0bd8d..1b71a180a7c852a683a18905f7cf71f128ca5ab9 100644 --- a/src/host/server.cpp +++ b/src/host/server.cpp @@ -705,8 +705,8 @@ bool HdcServer::ServerSessionHandshake(HSession hSession, uint8_t *payload, int } // call in child thread -bool HdcServer::FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, - const int payloadSize) +bool HdcServer::FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, + uint8_t *payload, const int payloadSize) { bool ret = true; HdcServerForClient *sfc = static_cast(clsServerForClient); @@ -1265,7 +1265,7 @@ bool HdcServer::ServerCommand(const uint32_t sessionId, const uint32_t channelId } // clang-format off -bool HdcServer::RedirectToTask(HTaskInfo hTaskInfo, HSession hSession, const uint32_t channelId, +bool HdcServer::RedirectToTask(HTaskInfo hTaskInfo, HSession /* hSession */, const uint32_t /* channelId */, const uint16_t command, uint8_t *payload, const int payloadSize) // clang-format on { diff --git a/src/host/server_for_client.cpp b/src/host/server_for_client.cpp index 3e55128104df95482ebb909d5234d377b523bc53..25fe94136b244560f29d2d98d083f62ce8dea3c4 100644 --- a/src/host/server_for_client.cpp +++ b/src/host/server_for_client.cpp @@ -967,7 +967,7 @@ HSession HdcServerForClient::FindAliveSessionFromDaemonMap(const HChannel hChann } #ifdef __OHOS__ -int HdcServerForClient::BindChannelToSession(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) +int HdcServerForClient::BindChannelToSession(HChannel hChannel) { StartTraceScope("HdcServerForClient::BindChannelToSession"); if (FindAliveSessionFromDaemonMap(hChannel) == nullptr) { @@ -1017,7 +1017,7 @@ int HdcServerForClient::BindChannelToSession(HChannel hChannel, uint8_t *bufPtr, return RET_SUCCESS; } #else -int HdcServerForClient::BindChannelToSession(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) +int HdcServerForClient::BindChannelToSession(HChannel hChannel) { StartTraceScope("HdcServerForClient::BindChannelToSession"); if (FindAliveSessionFromDaemonMap(hChannel) == nullptr) { @@ -1110,7 +1110,7 @@ int HdcServerForClient::ChannelHandShake(HChannel hChannel, uint8_t *bufPtr, con return 0; } // channel handshake stBindChannelToSession - if (BindChannelToSession(hChannel, nullptr, 0)) { + if (BindChannelToSession(hChannel)) { hChannel->availTailIndex = 0; WRITE_LOG(LOG_FATAL, "BindChannelToSession failed channelId:%u sid:%u", hChannel->channelId, hChannel->targetSessionId); diff --git a/src/host/server_for_client.h b/src/host/server_for_client.h index aa25c7c2aa618d8ec1ba6d62d23ad1c2c869004d..418530b77e96f0a7ad0110b444499c7ac4c54637 100644 --- a/src/host/server_for_client.h +++ b/src/host/server_for_client.h @@ -45,7 +45,7 @@ private: bool NewConnectTry(void *ptrServer, HChannel hChannel, const string &connectKey, bool isCheck = false); static void OrderConnecTargetResult(uv_timer_t *req); bool SendToDaemon(HChannel hChannel, const uint16_t commandFlag, uint8_t *bufPtr, const int bufSize); - int BindChannelToSession(HChannel hChannel, uint8_t *bufPtr, const int bytesIO); + int BindChannelToSession(HChannel hChannel); bool CheckAutoFillTarget(HChannel hChannel); bool CommandRemoveSession(HChannel hChannel, const char *connectKey); bool CommandRemoveForward(const string &forwardKey);