diff --git a/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp b/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp index 3a442c21a8f7fe52b216bb740a751cbd3b27e5a5..42aac4ed71cbc01f7c487d73137aab519696c4f1 100644 --- a/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp +++ b/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp @@ -839,7 +839,7 @@ int32_t DeviceManagerImpl::SetUserOperation(const std::string &pkgName, int32_t { if (pkgName.empty() || params.empty()) { LOGE("DeviceManager::SetUserOperation start, pkgName: %{public}s, params: %{public}s", pkgName.c_str(), - params.c_str()); + GetAnonyString(params).c_str()); return ERR_DM_INPUT_PARA_INVALID; } LOGI("Start, pkgName: %{public}s", pkgName.c_str()); diff --git a/services/implementation/src/authentication_v2/auth_stages/auth_acl.cpp b/services/implementation/src/authentication_v2/auth_stages/auth_acl.cpp index 23ed565e029c67afa7a7c9c30287bdb70471a101..73dedccd089963445303624090f8489e53df2147 100644 --- a/services/implementation/src/authentication_v2/auth_stages/auth_acl.cpp +++ b/services/implementation/src/authentication_v2/auth_stages/auth_acl.cpp @@ -85,7 +85,7 @@ int32_t AuthSrcDataSyncState::Action(std::shared_ptr context) char udidHashTmp[DM_MAX_DEVICE_ID_LEN] = {0}; if (Crypto::GetUdidHash(context->accessee.deviceId, reinterpret_cast(udidHashTmp)) != DM_OK) { LOGE("AuthSrcDataSyncState joinLnn get udidhash by udid: %{public}s failed", - context->accessee.deviceId.c_str()); + GetAnonyString(context->accessee.deviceId).c_str()); return ERR_DM_FAILED; } std::string peerUdidHash = std::string(udidHashTmp); diff --git a/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp b/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp index 564703c7423d00bcf955e9bc09bfcca5eb2529d6..f9b71d6ebc3c827a52f112cf5dcc8c58a15ec7bc 100644 --- a/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp +++ b/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp @@ -399,8 +399,9 @@ void AuthSrcConfirmState::GetIdenticalCredentialInfo(std::shared_ptraccesser.userId); queryParams[FILED_CRED_TYPE] = DM_AUTH_CREDENTIAL_ACCOUNT_RELATED; CHECK_NULL_VOID(context->hiChainAuthConnector); - if (context->hiChainAuthConnector->QueryCredentialInfo(context->accesser.userId, queryParams, credInfo) != DM_OK) { - LOGE("QueryCredentialInfo failed credInfo %{public}s.", credInfo.Dump().c_str()); + int32_t ret = context->hiChainAuthConnector->QueryCredentialInfo(context->accesser.userId, queryParams, credInfo); + if (ret != DM_OK) { + LOGE("QueryCredentialInfo failed ret %{public}d.", ret); } } @@ -414,8 +415,9 @@ void AuthSrcConfirmState::GetShareCredentialInfo(std::shared_ptr queryParams[FILED_PEER_USER_SPACE_ID] = std::to_string(context->accessee.userId); queryParams[FILED_CRED_TYPE] = DM_AUTH_CREDENTIAL_ACCOUNT_ACROSS; CHECK_NULL_VOID(context->hiChainAuthConnector); - if (context->hiChainAuthConnector->QueryCredentialInfo(context->accesser.userId, queryParams, credInfo) != DM_OK) { - LOGE("QueryCredentialInfo failed credInfo %{public}s.", credInfo.Dump().c_str()); + int32_t ret = context->hiChainAuthConnector->QueryCredentialInfo(context->accesser.userId, queryParams, credInfo); + if (ret != DM_OK) { + LOGE("QueryCredentialInfo failed ret %{public}d.", ret); } } @@ -430,8 +432,9 @@ void AuthSrcConfirmState::GetP2PCredentialInfo(std::shared_ptr co queryParams[FILED_CRED_TYPE] = DM_AUTH_CREDENTIAL_ACCOUNT_UNRELATED; queryParams[FILED_CRED_OWNER] = "DM"; CHECK_NULL_VOID(context->hiChainAuthConnector); - if (context->hiChainAuthConnector->QueryCredentialInfo(context->accesser.userId, queryParams, credInfo) != DM_OK) { - LOGE("QueryCredentialInfo failed credInfo %{public}s.", credInfo.Dump().c_str()); + int32_t ret = context->hiChainAuthConnector->QueryCredentialInfo(context->accesser.userId, queryParams, credInfo); + if (ret != DM_OK) { + LOGE("QueryCredentialInfo failed ret %{public}d.", ret); } } diff --git a/services/implementation/src/device_manager_service_impl.cpp b/services/implementation/src/device_manager_service_impl.cpp index 236880e52d35f989597a4ba4dc3a7b3bc5201928..199b3dcd0448f0241e7509ddc04bbf4e4d991398 100644 --- a/services/implementation/src/device_manager_service_impl.cpp +++ b/services/implementation/src/device_manager_service_impl.cpp @@ -1772,7 +1772,8 @@ void DeviceManagerServiceImpl::BindTargetImpl(uint64_t tokenId, const std::strin // Created only at the source end. The same target device will not be created repeatedly with the new protocol. std::shared_ptr curSession = GetOrCreateSession(targetIdTmp.deviceId, bindParam); if (curSession == nullptr) { - LOGE("Failed to create the session. Target deviceId: %{public}s.", targetIdTmp.deviceId.c_str()); + LOGE("Failed to create the session. Target deviceId: %{public}s.", + GetAnonyString(targetIdTmp.deviceId).c_str()); OnAuthResultAndOnBindResult(processInfo, targetId, targetIdTmp.deviceId, ERR_DM_TIME_OUT); return; } diff --git a/services/service/src/relationshipsyncmgr/dm_comm_tool.cpp b/services/service/src/relationshipsyncmgr/dm_comm_tool.cpp index 77ecde4ca6772980c2df35e2d34bd60b5cb7b082..56111b6916952f20cf2f4e40458319d0ad65f333 100644 --- a/services/service/src/relationshipsyncmgr/dm_comm_tool.cpp +++ b/services/service/src/relationshipsyncmgr/dm_comm_tool.cpp @@ -393,7 +393,7 @@ void DMCommTool::ProcessReceiveCommonEvent(const std::shared_ptr c std::string rmtUdid = ""; SoftbusCache::GetInstance().GetUdidFromCache(commMsg->remoteNetworkId.c_str(), rmtUdid); if (rmtUdid.empty()) { - LOGE("Can not find remote udid by networkid: %{public}s", commMsg->remoteNetworkId.c_str()); + LOGE("Can not find remote udid by networkid: %{public}s", GetAnonyString(commMsg->remoteNetworkId).c_str()); return; } @@ -439,7 +439,7 @@ void DMCommTool::ProcessResponseCommonEvent(const std::shared_ptr std::string rmtUdid = ""; SoftbusCache::GetInstance().GetUdidFromCache(commMsg->remoteNetworkId.c_str(), rmtUdid); if (rmtUdid.empty()) { - LOGE("Can not find remote udid by networkid: %{public}s", commMsg->remoteNetworkId.c_str()); + LOGE("Can not find remote udid by networkid: %{public}s", GetAnonyString(commMsg->remoteNetworkId).c_str()); return; } @@ -462,7 +462,7 @@ void DMCommTool::ProcessReceiveUserIdsEvent(const std::shared_ptr std::string rmtUdid = ""; SoftbusCache::GetInstance().GetUdidFromCache(commMsg->remoteNetworkId.c_str(), rmtUdid); if (rmtUdid.empty()) { - LOGE("Can not find remote udid by networkid: %{public}s", commMsg->remoteNetworkId.c_str()); + LOGE("Can not find remote udid by networkid: %{public}s", GetAnonyString(commMsg->remoteNetworkId).c_str()); return; } @@ -565,7 +565,7 @@ void DMCommTool::ProcessReceiveUnBindAppEvent(const std::shared_ptr