diff --git a/samgr/source/message.c b/samgr/source/message.c index c35e7619a7fc2c249af3d823a385e7280624a6b5..a117c2721fd3423e0521b831b7639c430613c412 100644 --- a/samgr/source/message.c +++ b/samgr/source/message.c @@ -36,7 +36,7 @@ int32 SAMGR_SendRequest(const Identity *identity, const Request *request, Handle return EC_INVALID; } - Exchange exchange = {*identity, *request, {NULL, 0}, MSG_NON, handler, NULL}; + Exchange exchange = {*identity, *request, {NULL, 0, NULL}, MSG_NON, handler, NULL}; exchange.id.queueId = NULL; if (handler != NULL) { exchange.id.queueId = SAMGR_GetCurrentQueueID(); diff --git a/samgr_endpoint/source/endpoint_rpc.c b/samgr_endpoint/source/endpoint_rpc.c index f3048b76a3aa9ed7b432689f59e74361a7e520c7..65dc2481cb4d93d70823d1d77a19fd9135b7db09 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(); if (samgr == NULL) { return EC_INVALID; } @@ -153,7 +153,7 @@ int32 SAMGR_GetSysCap(const Endpoint *endpoint, const char *sysCap, BOOL *isReg) IpcIo reply; void *replyBuf = NULL; - SvcIdentity *samgr = GetContextObject(); + const SvcIdentity *samgr = GetContextObject(); if (samgr == NULL) { return EC_INVALID; } @@ -186,7 +186,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(); if (samgr == NULL) { return EC_INVALID; } diff --git a/samgr_endpoint/source/samgr_small_ipc_adapter.c b/samgr_endpoint/source/samgr_small_ipc_adapter.c index ad287dfc0ca8a9a9251d6046e3b742b18909878b..378d14aa426023228fba4a1aa316dfcf7ef5ee6e 100644 --- a/samgr_endpoint/source/samgr_small_ipc_adapter.c +++ b/samgr_endpoint/source/samgr_small_ipc_adapter.c @@ -18,8 +18,8 @@ typedef struct IRegisterEpArg IRegisterEpArg; struct IRegisterEpArg { Endpoint *endpoint; int token; - char *service; - char *feature; + const char *service; + const char *feature; }; static int Dispatch(uint32_t code, IpcIo *data, IpcIo *reply, MessageOption option); static void HandleIpc(const Request *request, const Response *response); @@ -113,7 +113,7 @@ static void *Receive(void *argv) ret = registerEpArg->endpoint->registerEP(®isterEpArg->endpoint->identity, registerEpArg->token, registerEpArg->service, registerEpArg->feature); if (ret == EC_SUCCESS) { - SvcIdentity *samgr = GetContextObject(); + const SvcIdentity *samgr = GetContextObject(); if (samgr == NULL) { continue; } @@ -182,7 +182,7 @@ int RegisterIdentity(const SaName *saName, SvcIdentity *saInfo, PolicyTrans **po WriteUint32(&req, saInfo->token); IpcIo reply; void *replyBuf = NULL; - SvcIdentity *samgr = GetContextObject(); + const SvcIdentity *samgr = GetContextObject(); if (samgr == NULL) { return EC_INVALID; }