未验证 提交 815d3a5f 编写于 作者: O openharmony_ci 提交者: Gitee

!91 【轻量级 PR】:update aw/cxx/distributed/distributed_agent.cpp.

Merge pull request !91 from zhangchunbao/N/A
......@@ -103,12 +103,12 @@ int DistributedAgent::InitAgentServer()
}
if (listen(serverSockFd, 1) < 0) {
HiLog::Error(DistributedAgent::LABEL, "%s agent listen error.\n", agentIpAddr_.c_str());
HiLog::Error(DistributedAgent::LABEL, "agent listen error.\n");
close(serverSockFd);
serverSockFd = -1;
return serverSockFd;
}
HiLog::Info(DistributedAgent::LABEL, "listen %s .......", agentIpAddr_.c_str());
mpthCmdProcess_ = std::make_unique<std::thread>([=]() {
DoCmdServer(serverSockFd);
});
......@@ -196,6 +196,8 @@ int DistributedAgent::DoCmdServer(int serverSockFd)
int nresult = OnProcessCmd(pAlignmentCmd, cmdLen, pszEValue, eValueLen);
ret = memset_s(returnValue, sizeof(returnValue), 0, MAX_BUFF_LEN);
if (ret != EOK) {
delete []pAlignmentCmd;
delete []pszEValue;
return -1;
}
auto pclinereturn = reinterpret_cast<DistributedMsg *>(returnValue);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册