mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-26 16:41:00 +00:00
新增token认证
Signed-off-by: s30035957 <sunwei158@huawei.com>
This commit is contained in:
parent
98488e7cc9
commit
73ff7c85de
@ -101,14 +101,6 @@ public:
|
||||
return OK;
|
||||
}
|
||||
|
||||
bool CheckFreqToken(std::string &recvStr) const {
|
||||
if (recvStr.find("-lockfreq") && SPTask::GetInstance().GetTcpToken() == "") {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void TypeTcp(SpServerSocket &spSocket) const
|
||||
{
|
||||
SocketHeartbeat();
|
||||
@ -143,9 +135,10 @@ public:
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!CheckFreqToken(recvStr)) {
|
||||
if (recvStr.find("-lockfreq") != recvStr.end() &&
|
||||
SPTask::GetInstance().GetTcpToken() == "") {
|
||||
LOGE("lockfreq must have token");
|
||||
return;
|
||||
return ;
|
||||
}
|
||||
ErrCode code = SPTask::GetInstance().InitTask(SplitMsg(recvStr));
|
||||
LOGD("init::%s", (code == ErrCode::OK) ? "True" : "False");
|
||||
|
Loading…
Reference in New Issue
Block a user