From 9ec66879d54f35b64523a12dc6019182527cf9e7 Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Tue, 19 Apr 2022 15:57:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- .../src/ipc/standard/ipc_cmd_parser.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/devicemanagerservice/src/ipc/standard/ipc_cmd_parser.cpp b/services/devicemanagerservice/src/ipc/standard/ipc_cmd_parser.cpp index 6c01ffbf3..1b8f5d954 100644 --- a/services/devicemanagerservice/src/ipc/standard/ipc_cmd_parser.cpp +++ b/services/devicemanagerservice/src/ipc/standard/ipc_cmd_parser.cpp @@ -140,9 +140,9 @@ ON_IPC_SET_REQUEST(SERVER_AUTH_RESULT, std::shared_ptr pBaseReq, Message if (pBaseReq == nullptr) { return DM_FAILED; } - std::shared_ptr pReq = std::make_shared(); + std::shared_ptr pReq = std::static_pointer_cast(pBaseReq); - std::string pkgName = pBaseReq->GetPkgName(); + std::string pkgName = pReq->GetPkgName(); std::string deviceId = pReq->GetDeviceId(); std::string token = pReq->GetPinToken(); int32_t status = pReq->GetStatus(); @@ -185,9 +185,9 @@ ON_IPC_SET_REQUEST(SERVER_VERIFY_AUTH_RESULT, std::shared_ptr pBaseReq, if (pBaseReq == nullptr) { return DM_FAILED; } - std::shared_ptr pReq = std::make_shared(); + std::shared_ptr pReq = std::static_pointer_cast(pBaseReq); - std::string pkgName = pBaseReq->GetPkgName(); + std::string pkgName = pReq->GetPkgName(); std::string deviceId = pReq->GetDeviceId(); int32_t result = pReq->GetResult(); int32_t flag = pReq->GetFlag(); @@ -226,9 +226,9 @@ ON_IPC_SET_REQUEST(SERVER_DEVICE_FA_NOTIFY, std::shared_ptr pBaseReq, Me return DM_FAILED; } - std::shared_ptr pReq = std::make_shared(); + std::shared_ptr pReq = std::static_pointer_cast(pBaseReq); - std::string packagname = pBaseReq->GetPkgName(); + std::string packagname = pReq->GetPkgName(); std::string paramJson = pReq->GetJsonParam(); if (!data.WriteString(packagname)) { LOGE("write pkgName failed"); -- Gitee From 92cd0b15a76047150fda0df6815b0ca8915a18f5 Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Tue, 19 Apr 2022 16:03:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- .../devicemanagerservice/src/ipc/standard/ipc_cmd_parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/devicemanagerservice/src/ipc/standard/ipc_cmd_parser.cpp b/services/devicemanagerservice/src/ipc/standard/ipc_cmd_parser.cpp index 1b8f5d954..0c29b7873 100644 --- a/services/devicemanagerservice/src/ipc/standard/ipc_cmd_parser.cpp +++ b/services/devicemanagerservice/src/ipc/standard/ipc_cmd_parser.cpp @@ -185,7 +185,8 @@ ON_IPC_SET_REQUEST(SERVER_VERIFY_AUTH_RESULT, std::shared_ptr pBaseReq, if (pBaseReq == nullptr) { return DM_FAILED; } - std::shared_ptr pReq = std::static_pointer_cast(pBaseReq); + std::shared_ptr pReq = + std::static_pointer_cast(pBaseReq); std::string pkgName = pReq->GetPkgName(); std::string deviceId = pReq->GetDeviceId(); -- Gitee