未验证 提交 76b64542 编写于 作者: O openharmony_ci 提交者: Gitee

!378 解决FindSystemParam问题

Merge pull request !378 from 熊磊/init_find
......@@ -114,9 +114,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.
先完成此消息的编辑!
想要评论请 注册