From aeb2fd4003e8b5b3dd60719ffd0777cbeb0d7dd8 Mon Sep 17 00:00:00 2001 From: frank-huangran Date: Thu, 21 Nov 2024 13:50:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=81=E9=A2=91=E9=9C=80=E6=B1=82=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E9=BB=84=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: frank-huangran --- .../client/client_command/include/sp_thread_socket.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/host/smartperf/client/client_command/include/sp_thread_socket.h b/host/smartperf/client/client_command/include/sp_thread_socket.h index 6ec9d9f8b..9e89bbb80 100644 --- a/host/smartperf/client/client_command/include/sp_thread_socket.h +++ b/host/smartperf/client/client_command/include/sp_thread_socket.h @@ -88,6 +88,13 @@ public: } SocketErrorType CheckToken(std::string recvStr, SpServerSocket &spSocket) const { + if (recvStr.find_last_of(":") == std::string::npos) { + if (recvStr.find("SP_daemon -editor") != std::string::npos) { + return OK; + } else { + return TOKEN_CHECK_FAILED; + } + } std::string token = recvStr.substr(recvStr.find_last_of(":") + 1); token = token.substr(0, token.find(' ')); std::string tcpToken = SPTask::GetInstance().GetTcpToken();