From b763c6e10665521aad796a3d0be0b6ae4d687726 Mon Sep 17 00:00:00 2001 From: Mr_YX <496043997@qq.com> Date: Thu, 2 Jun 2022 08:01:05 +0000 Subject: [PATCH] =?UTF-8?q?=E3=80=8COpenHarmony=E5=BC=80=E6=BA=90=E8=B4=A1?= =?UTF-8?q?=E7=8C=AE=E8=80=85=E8=AE=A1=E5=88=922022=E3=80=8Dupdate=20samgr?= =?UTF-8?q?=5Fendpoint/source/endpoint=5Frpc.c.=20Signed-off-by:=20mr-yx?= =?UTF-8?q?=20<496043997@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- samgr_endpoint/source/endpoint_rpc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samgr_endpoint/source/endpoint_rpc.c b/samgr_endpoint/source/endpoint_rpc.c index 9a40af6..864ef1f 100644 --- a/samgr_endpoint/source/endpoint_rpc.c +++ b/samgr_endpoint/source/endpoint_rpc.c @@ -115,7 +115,7 @@ int32 SAMGR_AddSysCap(const Endpoint *endpoint, const char *sysCap, BOOL isReg) IpcIo reply; void *replyBuf = NULL; - SvcIdentity *samgr = GetContextObject(); + const SvcIdentity *samgr = GetContextObject(); MessageOption option; MessageOptionInit(&option); int ret = SendRequest(*samgr, INVALID_INDEX, &req, &reply, @@ -150,7 +150,7 @@ int32 SAMGR_GetSysCap(const Endpoint *endpoint, const char *sysCap, BOOL *isReg) IpcIo reply; void *replyBuf = NULL; - SvcIdentity *samgr = GetContextObject(); + const SvcIdentity *samgr = GetContextObject(); MessageOption option; MessageOptionInit(&option); int ret = SendRequest(*samgr, INVALID_INDEX, &req, &reply, @@ -180,7 +180,7 @@ static int SendGetAllSysCapsRequest(const Endpoint *endpoint, uint32 startIdx, I WriteUint32(&req, RES_SYSCAP); WriteUint32(&req, OP_ALL); WriteUint32(&req, startIdx); - SvcIdentity *samgr = GetContextObject(); + const SvcIdentity *samgr = GetContextObject(); MessageOption option; MessageOptionInit(&option); int ret = SendRequest(*samgr, INVALID_INDEX, &req, reply, @@ -273,7 +273,7 @@ int SAMGR_ProcPolicy(const Endpoint *endpoint, const SaName *saName, int token) continue; } HILOG_INFO(HILOG_MODULE_SAMGR, "Register server sa<%s, %s> id<%lu, %u> retry:%d ret:%d!", - saName->service, saName->feature, saInfo.handle, saInfo.token, retry, ret); + saName->service, saName->feature, (unsigned long)saInfo.handle, (unsigned long)saInfo.token, retry, ret); ret = AddPolicyToRouter(endpoint, &saInfo, policy, policyNum); SAMGR_Free(policy); if (ret == EC_SUCCESS) { -- Gitee