diff --git a/samgr_endpoint/source/default_client_rpc.c b/samgr_endpoint/source/default_client_rpc.c old mode 100755 new mode 100644 index fe317b96bf4d078c4c57ac302164f1ca1644595a..b1f0d5cfbf64b3f3080e000dcee49a540a170abf --- a/samgr_endpoint/source/default_client_rpc.c +++ b/samgr_endpoint/source/default_client_rpc.c @@ -217,7 +217,9 @@ static int ProxyInvoke(IClientProxy *proxy, int funcId, IpcIo *request, IOwner o IpcIo reply; void *replyBuf = NULL; - MessageOption flag = (notify == NULL) ? TF_OP_ASYNC : TF_OP_SYNC; + MessageOption flag; + MessageOptionInit(&flag); + flag.flags = (notify == NULL) ? TF_OP_ASYNC : TF_OP_SYNC; HILOG_DEBUG(HILOG_MODULE_SAMGR, "%d %lu, %lu, saId: %d\n", header->target.handle, header->target.token, header->target.cookie, header->saId); IpcIo requestWrapper; @@ -277,7 +279,9 @@ static SvcIdentity QueryIdentity(const char *service, const char *feature) IpcIo reply; void *replyBuf = NULL; SvcIdentity samgr = {SAMGR_HANDLE, SAMGR_TOKEN, SAMGR_COOKIE}; - int ret = SendRequest(samgr, INVALID_INDEX, &req, &reply, TF_OP_SYNC, (uintptr_t *)&replyBuf); + MessageOption flag; + MessageOptionInit(&flag); + int ret = SendRequest(samgr, INVALID_INDEX, &req, &reply, flag, (uintptr_t *)&replyBuf); int32_t sa_ret; ret = (ret != EC_SUCCESS) ? EC_FAILURE : ReadInt32(&reply, &sa_ret); SvcIdentity target = {INVALID_INDEX, INVALID_INDEX, INVALID_INDEX}; diff --git a/samgr_endpoint/source/endpoint_rpc.c b/samgr_endpoint/source/endpoint_rpc.c old mode 100755 new mode 100644 index da8f445aeee59651385ba3dcba6b5bb9c994bdaa..885c79f5287e10df08edf3ffe6ff35a1d67280a0 --- a/samgr_endpoint/source/endpoint_rpc.c +++ b/samgr_endpoint/source/endpoint_rpc.c @@ -166,8 +166,10 @@ int32 SAMGR_AddSysCap(const Endpoint *endpoint, const char *sysCap, BOOL isReg) IpcIo reply; void *replyBuf = NULL; SvcIdentity samgr = {SAMGR_HANDLE, SAMGR_TOKEN, SAMGR_COOKIE}; + MessageOption option; + MessageOptionInit(&option); int ret = SendRequest(samgr, INVALID_INDEX, &req, &reply, - TF_OP_SYNC, (uintptr_t *)&replyBuf); + option, (uintptr_t *)&replyBuf); ret = -ret; int32_t ipcRet = ret; if (ret == EC_SUCCESS) { @@ -198,8 +200,10 @@ int32 SAMGR_GetSysCap(const Endpoint *endpoint, const char *sysCap, BOOL *isReg) IpcIo reply; void *replyBuf = NULL; SvcIdentity samgr = {SAMGR_HANDLE, SAMGR_TOKEN, SAMGR_COOKIE}; + MessageOption option; + MessageOptionInit(&option); int ret = SendRequest(samgr, INVALID_INDEX, &req, &reply, - TF_OP_SYNC, (uintptr_t *)&replyBuf); + option, (uintptr_t *)&replyBuf); ret = -ret; *isReg = FALSE; int32_t ipcRet = ret; @@ -225,8 +229,10 @@ static int SendGetAllSysCapsRequest(const Endpoint *endpoint, uint32 startIdx, I WriteUint32(&req, OP_ALL); WriteUint32(&req, startIdx); SvcIdentity samgr = {SAMGR_HANDLE, SAMGR_TOKEN, SAMGR_COOKIE}; + MessageOption option; + MessageOptionInit(&option); int ret = SendRequest(samgr, INVALID_INDEX, &req, reply, - TF_OP_SYNC, (uintptr_t *)replyBuf); + option, (uintptr_t *)replyBuf); HILOG_DEBUG(HILOG_MODULE_SAMGR, "SendGetAllSysCapsRequest startIdx:%d, ret:%d!", startIdx, ret); return -ret; } @@ -450,7 +456,9 @@ static int RegisterIdentity(const SaName *saName, SvcIdentity *saInfo, IpcIo reply; void *replyBuf = NULL; SvcIdentity samgr = {SAMGR_HANDLE, SAMGR_TOKEN, SAMGR_COOKIE}; - int ret = SendRequest(samgr, INVALID_INDEX, &req, &reply, TF_OP_SYNC, + MessageOption option; + MessageOptionInit(&option); + int ret = SendRequest(samgr, INVALID_INDEX, &req, &reply, option, (uintptr_t *)&replyBuf); ret = -ret; int32_t ipcRet;