diff --git a/interfaces/inner_kits/native_cpp/src/ipc/lite/ipc_cmd_parser.cpp b/interfaces/inner_kits/native_cpp/src/ipc/lite/ipc_cmd_parser.cpp index bd67cd215b5b3f1849ed7d7ff4f6c11f99a055bd..68048a8793641a884e74f16a87f920adea71ae1a 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/lite/ipc_cmd_parser.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/lite/ipc_cmd_parser.cpp @@ -193,7 +193,7 @@ ON_IPC_CMD(SERVER_DEVICE_STATE_NOTIFY, IpcIo &reply) DmDeviceState deviceState = static_cast(IpcIoPopInt32(&reply)); uint32_t size; const DmDeviceInfo *deviceInfo = (const DmDeviceInfo*)IpcIoPopFlatObj(&reply, &size); - if (pkgName == "" || len == 0 || deviceInfo == NULL) { + if (deviceInfo == NULL) { DMLOG(DM_LOG_ERROR, "OnDeviceOnline, get para failed"); return; } @@ -220,7 +220,7 @@ ON_IPC_CMD(SERVER_DEVICE_FOUND, IpcIo &reply) uint16_t subscribeId = IpcIoPopUint16(&reply); uint32_t size; const DmDeviceInfo *deviceInfo = (const DmDeviceInfo*)IpcIoPopFlatObj(&reply, &size); - if (pkgName == "" || len == 0 || deviceInfo == NULL) { + if (deviceInfo == NULL) { DMLOG(DM_LOG_ERROR, "OnDeviceChanged, get para failed"); return; } @@ -234,10 +234,6 @@ ON_IPC_CMD(SERVER_DISCOVER_FINISH, IpcIo &reply) uint16_t subscribeId = IpcIoPopUint16(&reply); int32_t failedReason = IpcIoPopInt32(&reply); - if (pkgName == "" || len == 0) { - DMLOG(DM_LOG_ERROR, "OnDiscoverySuccess, get para failed"); - return; - } if (failedReason == DEVICEMANAGER_OK) { DeviceManagerNotify::GetInstance().OnDiscoverySuccess(pkgName, subscribeId); } else { @@ -255,10 +251,6 @@ ON_IPC_CMD(SERVER_AUTH_RESULT, IpcIo &reply) int32_t status = IpcIoPopInt32(&reply); int32_t reason = IpcIoPopInt32(&reply); - if (pkgName == "" || len == 0 || deviceId == "" || devIdLen == 0) { - DMLOG(DM_LOG_ERROR, "OnAuthResult, get para failed"); - return; - } DeviceManagerNotify::GetInstance().OnAuthResult(pkgName, deviceId, pinToken, status, reason); } @@ -271,10 +263,6 @@ ON_IPC_CMD(SERVER_CHECK_AUTH_RESULT, IpcIo &reply) int32_t resultCode = IpcIoPopInt32(&reply); int32_t flag = IpcIoPopInt32(&reply); - if (pkgName == "" || len == 0 || deviceId == "" || devIdLen == 0) { - DMLOG(DM_LOG_ERROR, "OnAuthResult, get para failed"); - return; - } DeviceManagerNotify::GetInstance().OnCheckAuthResult(pkgName, deviceId, resultCode, flag); } diff --git a/services/devicemanagerservice/src/ipc/lite/ipc_cmd_parser.cpp b/services/devicemanagerservice/src/ipc/lite/ipc_cmd_parser.cpp index b71b3edfd6f95e21d45cdc533a3ddd9024f23eff..250af2661a4f21662aad0fc7bf85b346318aa829 100644 --- a/services/devicemanagerservice/src/ipc/lite/ipc_cmd_parser.cpp +++ b/services/devicemanagerservice/src/ipc/lite/ipc_cmd_parser.cpp @@ -40,7 +40,7 @@ ON_IPC_SET_REQUEST(SERVER_DEVICE_STATE_NOTIFY, std::shared_ptr pBaseReq, DmDeviceInfo deviceInfo = pReq->GetDeviceInfo(); IpcIoInit(&request, buffer, buffLen, 0); - IpcIoPushString(&request, pkgName.c_str()); + IpcIoPushString(&request, pkgName.c_str());-; IpcIoPushInt32(&request, deviceState); IpcIoPushFlatObj(&request, &deviceInfo, sizeof(DmDeviceInfo)); return DEVICEMANAGER_OK;