提交 c80d603a 编写于 作者: X xlei1030

同步critical服务重启引起的设备reboot命令死锁问题 && FindSystemParam问题

Signed-off-by: Nxlei1030 <xionglei6@huawei.com>
上级 fa7f95d3
......@@ -448,6 +448,7 @@ void ServiceReap(Service *service)
if (CalculateCrashTime(service, service->crashTime, service->crashCount) == false) {
INIT_LOGE("Critical service \" %s \" crashed %d times, rebooting system",
service->name, service->crashCount);
ServiceStop(GetServiceByName("appspawn"));
ExecReboot("reboot");
}
} else if (!(service->attribute & SERVICE_ATTR_NEED_RESTART)) {
......
......@@ -110,9 +110,10 @@ int ReadParamWithCheck(const ParamWorkSpace *workSpace, const char *name, uint32
PARAM_CHECK(handle != NULL, return PARAM_CODE_INVALID_PARAM, "Invalid param handle");
PARAM_CHECK(workSpace != NULL && name != NULL, return PARAM_CODE_INVALID_PARAM, "Invalid param name");
*handle = -1;
#ifdef READ_CHECK
int ret = CheckParamPermission(workSpace, workSpace->securityLabel, name, op);
PARAM_CHECK(ret == 0, return ret, "Forbid to access parameter %s", name);
#endif
ParamTrieNode *node = FindTrieNode(&workSpace->paramSpace, name, strlen(name), NULL);
if (node != NULL && node->dataIndex != 0) {
*handle = node->dataIndex;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册