diff --git a/interfaces/innerkits/accesstoken/src/accesstoken_kit.cpp b/interfaces/innerkits/accesstoken/src/accesstoken_kit.cpp index b8b99916b965fce232ad976ec497d23466f676e3..66ca1dadc2d7f84bbcee6cb2c91b09579e128c7c 100644 --- a/interfaces/innerkits/accesstoken/src/accesstoken_kit.cpp +++ b/interfaces/innerkits/accesstoken/src/accesstoken_kit.cpp @@ -45,7 +45,7 @@ AccessTokenIDEx AccessTokenKit::AllocHapToken(const HapInfoParams& info, const H AccessTokenID AccessTokenKit::AllocLocalTokenID(const std::string& remoteDeviceID, AccessTokenID remoteTokenID) { - ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{public}s tokenID=%{public}d", + ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{private}s tokenID=%{public}d", __func__, remoteDeviceID.c_str(), remoteTokenID); #ifdef DEBUG_API_PERFORMANCE ACCESSTOKEN_LOG_INFO(LABEL, "api_performance:start call"); @@ -324,7 +324,7 @@ int AccessTokenKit::GetAllNativeTokenInfo(std::vector& n int AccessTokenKit::SetRemoteHapTokenInfo(const std::string& deviceID, const HapTokenInfoForSync& hapSync) { - ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{public}s tokenID=%{public}d", + ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{private}s tokenID=%{public}d", __func__, deviceID.c_str(), hapSync.baseInfo.tokenID); return AccessTokenManagerClient::GetInstance().SetRemoteHapTokenInfo(deviceID, hapSync); } @@ -332,27 +332,27 @@ int AccessTokenKit::SetRemoteHapTokenInfo(const std::string& deviceID, int AccessTokenKit::SetRemoteNativeTokenInfo(const std::string& deviceID, std::vector& nativeTokenInfoList) { - ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{public}s", __func__, deviceID.c_str()); + ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{private}s", __func__, deviceID.c_str()); return AccessTokenManagerClient::GetInstance() .SetRemoteNativeTokenInfo(deviceID, nativeTokenInfoList); } int AccessTokenKit::DeleteRemoteToken(const std::string& deviceID, AccessTokenID tokenID) { - ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{public}s tokenID=%{public}d", + ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{private}s tokenID=%{public}d", __func__, deviceID.c_str(), tokenID); return AccessTokenManagerClient::GetInstance().DeleteRemoteToken(deviceID, tokenID); } int AccessTokenKit::DeleteRemoteDeviceTokens(const std::string& deviceID) { - ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{public}s", __func__, deviceID.c_str()); + ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{private}s", __func__, deviceID.c_str()); return AccessTokenManagerClient::GetInstance().DeleteRemoteDeviceTokens(deviceID); } AccessTokenID AccessTokenKit::GetRemoteNativeTokenID(const std::string& deviceID, AccessTokenID tokenID) { - ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{public}s tokenID=%{public}d", + ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{private}s tokenID=%{public}d", __func__, deviceID.c_str(), tokenID); return AccessTokenManagerClient::GetInstance().GetRemoteNativeTokenID(deviceID, tokenID); } diff --git a/interfaces/innerkits/tokensync/src/token_sync_kit.cpp b/interfaces/innerkits/tokensync/src/token_sync_kit.cpp index 090153e7bb389f52b4cc4bad36364b81f1901897..415cf1f0f5c2b1def15b6cfebdc0d0399d93a86c 100644 --- a/interfaces/innerkits/tokensync/src/token_sync_kit.cpp +++ b/interfaces/innerkits/tokensync/src/token_sync_kit.cpp @@ -32,7 +32,7 @@ static constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {LOG_CORE, SECURITY_DOMAIN_ int TokenSyncKit::GetRemoteHapTokenInfo(const std::string& deviceID, AccessTokenID tokenID) { - ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{public}s tokenID=%{public}d", + ACCESSTOKEN_LOG_INFO(LABEL, "%{public}s called, deviceID=%{private}s tokenID=%{public}d", __func__, deviceID.c_str(), tokenID); return TokenSyncManagerClient::GetInstance().GetRemoteHapTokenInfo(deviceID, tokenID); } diff --git a/services/accesstokenmanager/main/cpp/src/service/accesstoken_manager_service.cpp b/services/accesstokenmanager/main/cpp/src/service/accesstoken_manager_service.cpp index 37ee9f47f637426a92c166f9dad3b18275af03ad..24fcdf6aa432a995b1566958777beea992da9a82 100644 --- a/services/accesstokenmanager/main/cpp/src/service/accesstoken_manager_service.cpp +++ b/services/accesstokenmanager/main/cpp/src/service/accesstoken_manager_service.cpp @@ -247,7 +247,7 @@ AccessTokenID AccessTokenManagerService::GetHapTokenID(int userID, const std::st AccessTokenID AccessTokenManagerService::AllocLocalTokenID( const std::string& remoteDeviceID, AccessTokenID remoteTokenID) { - ACCESSTOKEN_LOG_INFO(LABEL, "called, remoteDeviceID: %{public}s, remoteTokenID: %{public}d", + ACCESSTOKEN_LOG_INFO(LABEL, "called, remoteDeviceID: %{private}s, remoteTokenID: %{public}d", remoteDeviceID.c_str(), remoteTokenID); return AccessTokenInfoManager::GetInstance().AllocLocalTokenID(remoteDeviceID, remoteTokenID); } @@ -303,7 +303,7 @@ int AccessTokenManagerService::GetAllNativeTokenInfo(std::vector& nativeTokenInfoForSyncParcel) { - ACCESSTOKEN_LOG_INFO(LABEL, "called, deviceID: %{public}s", deviceID.c_str()); + ACCESSTOKEN_LOG_INFO(LABEL, "called, deviceID: %{private}s", deviceID.c_str()); std::vector nativeList; @@ -325,7 +325,7 @@ int AccessTokenManagerService::SetRemoteNativeTokenInfo(const std::string& devic int AccessTokenManagerService::DeleteRemoteToken(const std::string& deviceID, AccessTokenID tokenID) { - ACCESSTOKEN_LOG_INFO(LABEL, "called, deviceID: %{public}s, token id %{public}d", + ACCESSTOKEN_LOG_INFO(LABEL, "called, deviceID: %{private}s, token id %{public}d", deviceID.c_str(), tokenID); return AccessTokenInfoManager::GetInstance().DeleteRemoteToken(deviceID, tokenID); @@ -334,7 +334,7 @@ int AccessTokenManagerService::DeleteRemoteToken(const std::string& deviceID, Ac AccessTokenID AccessTokenManagerService::GetRemoteNativeTokenID(const std::string& deviceID, AccessTokenID tokenID) { - ACCESSTOKEN_LOG_INFO(LABEL, "called, deviceID: %{public}s, token id %{public}d", + ACCESSTOKEN_LOG_INFO(LABEL, "called, deviceID: %{private}s, token id %{public}d", deviceID.c_str(), tokenID); return AccessTokenInfoManager::GetInstance().GetRemoteNativeTokenID(deviceID, tokenID); @@ -342,7 +342,7 @@ AccessTokenID AccessTokenManagerService::GetRemoteNativeTokenID(const std::strin int AccessTokenManagerService::DeleteRemoteDeviceTokens(const std::string& deviceID) { - ACCESSTOKEN_LOG_INFO(LABEL, "called, deviceID: %{public}s", deviceID.c_str()); + ACCESSTOKEN_LOG_INFO(LABEL, "called, deviceID: %{private}s", deviceID.c_str()); return AccessTokenInfoManager::GetInstance().DeleteRemoteDeviceTokens(deviceID); } diff --git a/services/accesstokenmanager/main/cpp/src/token/accesstoken_info_manager.cpp b/services/accesstokenmanager/main/cpp/src/token/accesstoken_info_manager.cpp index 377417ce8de40cf12e406b9a1fff67f594b40cdc..e8f8a03668cb866e10dac9c08fbd32e081b4c5e1 100644 --- a/services/accesstokenmanager/main/cpp/src/token/accesstoken_info_manager.cpp +++ b/services/accesstokenmanager/main/cpp/src/token/accesstoken_info_manager.cpp @@ -647,14 +647,14 @@ int AccessTokenInfoManager::SetRemoteHapTokenInfo(const std::string& deviceID, H || !DataValidator::IsDlpTypeValid(hapSync.baseInfo.dlpType) || hapSync.baseInfo.ver != DEFAULT_TOKEN_VERSION || AccessTokenIDManager::GetInstance().GetTokenIdTypeEnum(hapSync.baseInfo.tokenID) != TOKEN_HAP) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s parms invalid", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s parms invalid", deviceID.c_str()); return RET_FAILED; } AccessTokenID remoteID = hapSync.baseInfo.tokenID; AccessTokenID mapID = AccessTokenRemoteTokenManager::GetInstance().GetDeviceMappingTokenID(deviceID, remoteID); if (mapID != 0) { - ACCESSTOKEN_LOG_INFO(LABEL, "device %{public}s token %{public}u update exist remote hap token %{public}u.", + ACCESSTOKEN_LOG_INFO(LABEL, "device %{private}s token %{public}u update exist remote hap token %{public}u.", deviceID.c_str(), remoteID, mapID); // update remote token mapping id hapSync.baseInfo.tokenID = mapID; @@ -665,7 +665,7 @@ int AccessTokenInfoManager::SetRemoteHapTokenInfo(const std::string& deviceID, H mapID = AccessTokenRemoteTokenManager::GetInstance().MapRemoteDeviceTokenToLocal(deviceID, remoteID); if (mapID == 0) { ACCESSTOKEN_LOG_ERROR( - LABEL, "device %{public}s token %{public}u map failed.", deviceID.c_str(), remoteID); + LABEL, "device %{private}s token %{public}u map failed.", deviceID.c_str(), remoteID); return RET_FAILED; } @@ -675,11 +675,11 @@ int AccessTokenInfoManager::SetRemoteHapTokenInfo(const std::string& deviceID, H if (CreateRemoteHapTokenInfo(mapID, hapSync) == RET_FAILED) { AccessTokenRemoteTokenManager::GetInstance().RemoveDeviceMappingTokenID(deviceID, mapID); - ACCESSTOKEN_LOG_INFO(LABEL, "device %{public}s token %{public}u map to local token %{public}u failed.", + ACCESSTOKEN_LOG_INFO(LABEL, "device %{private}s token %{public}u map to local token %{public}u failed.", deviceID.c_str(), remoteID, mapID); return RET_FAILED; } - ACCESSTOKEN_LOG_INFO(LABEL, "device %{public}s token %{public}u map to local token %{public}u success.", + ACCESSTOKEN_LOG_INFO(LABEL, "device %{private}s token %{public}u map to local token %{public}u success.", deviceID.c_str(), remoteID, mapID); return RET_SUCCESS; } @@ -688,7 +688,7 @@ int AccessTokenInfoManager::SetRemoteNativeTokenInfo(const std::string& deviceID std::vector& nativeTokenInfoList) { if (!DataValidator::IsDeviceIdValid(deviceID)) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s parms invalid", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s parms invalid", deviceID.c_str()); return RET_FAILED; } @@ -699,7 +699,7 @@ int AccessTokenInfoManager::SetRemoteNativeTokenInfo(const std::string& deviceID nativeToken.baseInfo.dcap.size() <= 0 || AccessTokenIDManager::GetInstance().GetTokenIdTypeEnum(nativeToken.baseInfo.tokenID) != TOKEN_NATIVE) { ACCESSTOKEN_LOG_ERROR( - LABEL, "device %{public}s token %{public}u is invalid.", + LABEL, "device %{private}s token %{public}u is invalid.", deviceID.c_str(), nativeToken.baseInfo.tokenID); continue; } @@ -708,7 +708,7 @@ int AccessTokenInfoManager::SetRemoteNativeTokenInfo(const std::string& deviceID AccessTokenID mapID = AccessTokenRemoteTokenManager::GetInstance().GetDeviceMappingTokenID(deviceID, remoteID); if (mapID != 0) { ACCESSTOKEN_LOG_ERROR( - LABEL, "device %{public}s token %{public}u has maped, no need update it.", + LABEL, "device %{private}s token %{public}u has maped, no need update it.", deviceID.c_str(), nativeToken.baseInfo.tokenID); continue; } @@ -717,19 +717,19 @@ int AccessTokenInfoManager::SetRemoteNativeTokenInfo(const std::string& deviceID if (mapID == 0) { AccessTokenRemoteTokenManager::GetInstance().RemoveDeviceMappingTokenID(deviceID, mapID); ACCESSTOKEN_LOG_ERROR( - LABEL, "device %{public}s token %{public}u map failed.", + LABEL, "device %{private}s token %{public}u map failed.", deviceID.c_str(), remoteID); continue; } nativeToken.baseInfo.tokenID = mapID; - ACCESSTOKEN_LOG_INFO(LABEL, "device %{public}s token %{public}u map to local token %{public}u.", + ACCESSTOKEN_LOG_INFO(LABEL, "device %{private}s token %{public}u map to local token %{public}u.", deviceID.c_str(), remoteID, mapID); std::shared_ptr nativePtr = std::make_shared(nativeToken.baseInfo, nativeToken.permStateList); if (nativePtr == nullptr) { AccessTokenRemoteTokenManager::GetInstance().RemoveDeviceMappingTokenID(deviceID, mapID); - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s tokenId %{public}u alloc local token failed.", + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s tokenId %{public}u alloc local token failed.", deviceID.c_str(), remoteID); continue; } @@ -737,11 +737,11 @@ int AccessTokenInfoManager::SetRemoteNativeTokenInfo(const std::string& deviceID int ret = AddNativeTokenInfo(nativePtr); if (ret != RET_SUCCESS) { AccessTokenRemoteTokenManager::GetInstance().RemoveDeviceMappingTokenID(deviceID, mapID); - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s tokenId %{public}u add local token failed.", + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s tokenId %{public}u add local token failed.", deviceID.c_str(), remoteID); continue; } - ACCESSTOKEN_LOG_INFO(LABEL, "device %{public}s token %{public}u map token %{public}u add success.", + ACCESSTOKEN_LOG_INFO(LABEL, "device %{private}s token %{public}u map token %{public}u add success.", deviceID.c_str(), remoteID, mapID); } @@ -751,12 +751,12 @@ int AccessTokenInfoManager::SetRemoteNativeTokenInfo(const std::string& deviceID int AccessTokenInfoManager::DeleteRemoteToken(const std::string& deviceID, AccessTokenID tokenID) { if (!DataValidator::IsDeviceIdValid(deviceID)) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s parms invalid", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s parms invalid", deviceID.c_str()); return RET_FAILED; } AccessTokenID mapID = AccessTokenRemoteTokenManager::GetInstance().GetDeviceMappingTokenID(deviceID, tokenID); if (mapID == 0) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s tokenId %{public}u is not mapped", + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s tokenId %{public}u is not mapped", deviceID.c_str(), tokenID); return RET_FAILED; } @@ -788,7 +788,7 @@ AccessTokenID AccessTokenInfoManager::GetRemoteNativeTokenID(const std::string& { if (!DataValidator::IsDeviceIdValid(deviceID) || AccessTokenIDManager::GetInstance().GetTokenIdTypeEnum(tokenID) != TOKEN_NATIVE) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s parms invalid", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s parms invalid", deviceID.c_str()); return 0; } return AccessTokenRemoteTokenManager::GetInstance().GetDeviceMappingTokenID(deviceID, tokenID); @@ -797,13 +797,13 @@ AccessTokenID AccessTokenInfoManager::GetRemoteNativeTokenID(const std::string& int AccessTokenInfoManager::DeleteRemoteDeviceTokens(const std::string& deviceID) { if (!DataValidator::IsDeviceIdValid(deviceID)) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s parms invalid", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s parms invalid", deviceID.c_str()); return RET_FAILED; } std::vector remoteTokens; int ret = AccessTokenRemoteTokenManager::GetInstance().GetDeviceAllRemoteTokenID(deviceID, remoteTokens); if (ret == RET_FAILED) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s have no remote token", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s have no remote token", deviceID.c_str()); return RET_FAILED; } for (AccessTokenID remoteID : remoteTokens) { @@ -830,11 +830,11 @@ AccessTokenID AccessTokenInfoManager::AllocLocalTokenID(const std::string& remot AccessTokenID remoteTokenID) { if (!DataValidator::IsDeviceIdValid(remoteDeviceID)) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s parms invalid", remoteDeviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s parms invalid", remoteDeviceID.c_str()); return 0; } std::string remoteUdid = GetUdidByNodeId(remoteDeviceID); - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s remoteUdid", remoteUdid.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s remoteUdid", remoteUdid.c_str()); AccessTokenID mapID = AccessTokenRemoteTokenManager::GetInstance().GetDeviceMappingTokenID(remoteUdid, remoteTokenID); if (mapID != 0) { @@ -842,7 +842,7 @@ AccessTokenID AccessTokenInfoManager::AllocLocalTokenID(const std::string& remot } int ret = TokenSyncKit::GetRemoteHapTokenInfo(remoteUdid, remoteTokenID); if (ret != RET_SUCCESS) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s token %{public}u sync failed", + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s token %{public}u sync failed", remoteUdid.c_str(), remoteTokenID); return 0; } diff --git a/services/accesstokenmanager/main/cpp/src/token/accesstoken_remote_token_manager.cpp b/services/accesstokenmanager/main/cpp/src/token/accesstoken_remote_token_manager.cpp index bc09553149c64e1611197f7df64c1dd80cd1346e..6f5b1e56739a01f57519f44020af9061302c5bca 100644 --- a/services/accesstokenmanager/main/cpp/src/token/accesstoken_remote_token_manager.cpp +++ b/services/accesstokenmanager/main/cpp/src/token/accesstoken_remote_token_manager.cpp @@ -44,7 +44,7 @@ AccessTokenID AccessTokenRemoteTokenManager::MapRemoteDeviceTokenToLocal(const s { if (!DataValidator::IsDeviceIdValid(deviceID) || !DataValidator::IsTokenIDValid(remoteID)) { ACCESSTOKEN_LOG_ERROR( - LABEL, "device %{public}s or token %{public}x is invalid.", deviceID.c_str(), remoteID); + LABEL, "device %{private}s or token %{public}x is invalid.", deviceID.c_str(), remoteID); return 0; } ATokenTypeEnum tokeType = AccessTokenIDManager::GetInstance().GetTokenIdTypeEnum(remoteID); @@ -63,7 +63,7 @@ AccessTokenID AccessTokenRemoteTokenManager::MapRemoteDeviceTokenToLocal(const s if (device.MappingTokenIDPairMap_.count(remoteID) > 0) { mapID = device.MappingTokenIDPairMap_[remoteID]; ACCESSTOKEN_LOG_ERROR( - LABEL, "device %{public}s token %{public}x has already mapped, maptokenID is %{public}x.", + LABEL, "device %{private}s token %{public}x has already mapped, maptokenID is %{public}x.", deviceID.c_str(), remoteID, mapID); return mapID; } @@ -78,7 +78,7 @@ AccessTokenID AccessTokenRemoteTokenManager::MapRemoteDeviceTokenToLocal(const s mapID = AccessTokenIDManager::GetInstance().CreateAndRegisterTokenId(tokeType, dlpType); if (mapID == 0) { ACCESSTOKEN_LOG_ERROR( - LABEL, "device %{public}s token %{public}x map local Token failed.", + LABEL, "device %{private}s token %{public}x map local Token failed.", deviceID.c_str(), remoteID); return 0; } @@ -90,12 +90,12 @@ int AccessTokenRemoteTokenManager::GetDeviceAllRemoteTokenID(const std::string& std::vector& remoteIDs) { if (!DataValidator::IsDeviceIdValid(deviceID)) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s is valid.", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s is valid.", deviceID.c_str()); return RET_FAILED; } Utils::UniqueReadGuard infoGuard(this->remoteDeviceLock_); if (remoteDeviceMap_.count(deviceID) < 1) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s has not mapping.", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s has not mapping.", deviceID.c_str()); return RET_FAILED; } @@ -110,14 +110,14 @@ AccessTokenID AccessTokenRemoteTokenManager::GetDeviceMappingTokenID(const std:: { if (!DataValidator::IsDeviceIdValid(deviceID) || !DataValidator::IsTokenIDValid(remoteID)) { ACCESSTOKEN_LOG_ERROR( - LABEL, "device %{public}s or token %{public}x is invalid.", deviceID.c_str(), remoteID); + LABEL, "device %{private}s or token %{public}x is invalid.", deviceID.c_str(), remoteID); return 0; } Utils::UniqueReadGuard infoGuard(this->remoteDeviceLock_); if (remoteDeviceMap_.count(deviceID) < 1 || remoteDeviceMap_[deviceID].MappingTokenIDPairMap_.count(remoteID) < 1) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s has not mapping.", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s has not mapping.", deviceID.c_str()); return 0; } @@ -129,14 +129,14 @@ int AccessTokenRemoteTokenManager::RemoveDeviceMappingTokenID(const std::string& { if (!DataValidator::IsDeviceIdValid(deviceID) || !DataValidator::IsTokenIDValid(remoteID)) { ACCESSTOKEN_LOG_ERROR( - LABEL, "device %{public}s or token %{public}x is invalid.", deviceID.c_str(), remoteID); + LABEL, "device %{private}s or token %{public}x is invalid.", deviceID.c_str(), remoteID); return RET_FAILED; } Utils::UniqueWriteGuard infoGuard(this->remoteDeviceLock_); if (remoteDeviceMap_.count(deviceID) < 1 || remoteDeviceMap_[deviceID].MappingTokenIDPairMap_.count(remoteID) < 1) { - ACCESSTOKEN_LOG_ERROR(LABEL, "device %{public}s has not mapping.", deviceID.c_str()); + ACCESSTOKEN_LOG_ERROR(LABEL, "device %{private}s has not mapping.", deviceID.c_str()); return RET_FAILED; } diff --git a/services/tokensyncmanager/src/remote/soft_bus_manager.cpp b/services/tokensyncmanager/src/remote/soft_bus_manager.cpp index 61c5be28b3f0a3c124ebbf3d2b0f6ec63fb3121d..8fe5de825dcb037d67bdf5b049d583d6f21a95f9 100644 --- a/services/tokensyncmanager/src/remote/soft_bus_manager.cpp +++ b/services/tokensyncmanager/src/remote/soft_bus_manager.cpp @@ -220,7 +220,7 @@ int32_t SoftBusManager::OpenSession(const std::string &deviceId) DeviceInfo info; bool result = DeviceInfoManager::GetInstance().GetDeviceInfo(deviceId, DeviceIdType::UNKNOWN, info); if (!result) { - ACCESSTOKEN_LOG_WARN(LABEL, "device info notfound for deviceId %{public}s", deviceId.c_str()); + ACCESSTOKEN_LOG_WARN(LABEL, "device info notfound for deviceId %{private}s", deviceId.c_str()); return Constant::FAILURE; } std::string networkId = info.deviceId.networkId;