!2040 锁频需求同步黄区

Merge pull request !2040 from 牛国亮/master
This commit is contained in:
openharmony_ci 2024-11-22 11:19:15 +00:00 committed by Gitee
commit 6c7ff86bb9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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();