From 7baee97c72a31daab5294cc9560065e2d5ec8e39 Mon Sep 17 00:00:00 2001 From: libaoping Date: Thu, 10 Feb 2022 15:11:37 +0800 Subject: [PATCH] Description: NodeDeivceInfoKey ->NodeDeviceInfoKey. Feature or Bugfix:Feature Binary Source: No Signed-off-by: libaoping --- .../include/dependency/softbus/softbus_connector.h | 2 +- .../src/authentication/dm_auth_manager.cpp | 2 +- .../src/dependency/softbus/softbus_connector.cpp | 10 +++++----- .../src/devicestate/dm_device_state_manager.cpp | 2 +- test/unittest/mock/softbus_bus_center.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/services/devicemanagerservice/include/dependency/softbus/softbus_connector.h b/services/devicemanagerservice/include/dependency/softbus/softbus_connector.h index ba60b083d..a7f5f3aa7 100644 --- a/services/devicemanagerservice/include/dependency/softbus/softbus_connector.h +++ b/services/devicemanagerservice/include/dependency/softbus/softbus_connector.h @@ -48,7 +48,7 @@ public: static bool IsDeviceOnLine(const std::string &deviceId); static int32_t GetUdidByNetworkId(const char *networkId, std::string &udid); static int32_t GetUuidByNetworkId(const char *networkId, std::string &uuid); - static int32_t GetNodeKeyInfoByNetworkId(const char *networkId, NodeDeivceInfoKey key, uint8_t *info, + static int32_t GetNodeKeyInfoByNetworkId(const char *networkId, NodeDeviceInfoKey key, uint8_t *info, int32_t infoLen); public: diff --git a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp index fba292bf6..2805e98ab 100644 --- a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp +++ b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp @@ -148,7 +148,7 @@ int32_t DmAuthManager::UnAuthenticateDevice(const std::string &pkgName, const st return DM_FAILED; } uint8_t udid[UDID_BUF_LEN] = {0}; - int32_t ret = SoftbusConnector::GetNodeKeyInfoByNetworkId(deviceId.c_str(), NodeDeivceInfoKey::NODE_KEY_UDID, udid, + int32_t ret = SoftbusConnector::GetNodeKeyInfoByNetworkId(deviceId.c_str(), NodeDeviceInfoKey::NODE_KEY_UDID, udid, sizeof(udid)); if (ret != DM_OK) { LOGE("UnAuthenticateDevice GetNodeKeyInfo failed"); diff --git a/services/devicemanagerservice/src/dependency/softbus/softbus_connector.cpp b/services/devicemanagerservice/src/dependency/softbus/softbus_connector.cpp index 413733922..4ece01e32 100644 --- a/services/devicemanagerservice/src/dependency/softbus/softbus_connector.cpp +++ b/services/devicemanagerservice/src/dependency/softbus/softbus_connector.cpp @@ -211,7 +211,7 @@ int32_t SoftbusConnector::StopDiscovery(uint16_t subscribeId) return DM_OK; } -int32_t SoftbusConnector::GetNodeKeyInfoByNetworkId(const char *networkId, NodeDeivceInfoKey key, uint8_t *info, +int32_t SoftbusConnector::GetNodeKeyInfoByNetworkId(const char *networkId, NodeDeviceInfoKey key, uint8_t *info, int32_t infoLen) { LOGI("GetNodeKeyInfoByNetworkId begin"); @@ -231,7 +231,7 @@ int32_t SoftbusConnector::GetUdidByNetworkId(const char *networkId, std::string LOGI("GetUdidByNetworkId begin"); uint8_t mUdid[UDID_BUF_LEN] = {0}; int32_t ret = - GetNodeKeyInfo(DM_PKG_NAME.c_str(), networkId, NodeDeivceInfoKey::NODE_KEY_UDID, mUdid, sizeof(mUdid)); + GetNodeKeyInfo(DM_PKG_NAME.c_str(), networkId, NodeDeviceInfoKey::NODE_KEY_UDID, mUdid, sizeof(mUdid)); if (ret != DM_OK) { LOGE("GetUdidByNetworkId GetNodeKeyInfo failed"); return DM_FAILED; @@ -246,7 +246,7 @@ int32_t SoftbusConnector::GetUuidByNetworkId(const char *networkId, std::string LOGI("GetUuidByNetworkId begin"); uint8_t mUuid[UUID_BUF_LEN] = {0}; int32_t ret = - GetNodeKeyInfo(DM_PKG_NAME.c_str(), networkId, NodeDeivceInfoKey::NODE_KEY_UUID, mUuid, sizeof(mUuid)); + GetNodeKeyInfo(DM_PKG_NAME.c_str(), networkId, NodeDeviceInfoKey::NODE_KEY_UUID, mUuid, sizeof(mUuid)); if (ret != DM_OK) { LOGE("GetUuidByNetworkId GetNodeKeyInfo failed"); return DM_FAILED; @@ -278,7 +278,7 @@ bool SoftbusConnector::IsDeviceOnLine(const std::string &deviceId) break; } uint8_t udid[UDID_BUF_LEN] = {0}; - int32_t ret = GetNodeKeyInfo(DM_PKG_NAME.c_str(), networkId.c_str(), NodeDeivceInfoKey::NODE_KEY_UDID, udid, + int32_t ret = GetNodeKeyInfo(DM_PKG_NAME.c_str(), networkId.c_str(), NodeDeviceInfoKey::NODE_KEY_UDID, udid, sizeof(udid)); if (ret != DM_OK) { LOGE("DM_IsDeviceOnLine GetNodeKeyInfo failed"); @@ -455,7 +455,7 @@ void SoftbusConnector::OnSoftBusDeviceOnline(NodeBasicInfo *info) // remove the discovery node map uint8_t udid[UDID_BUF_LEN] = {0}; int32_t ret = - GetNodeKeyInfo(DM_PKG_NAME.c_str(), info->networkId, NodeDeivceInfoKey::NODE_KEY_UDID, udid, sizeof(udid)); + GetNodeKeyInfo(DM_PKG_NAME.c_str(), info->networkId, NodeDeviceInfoKey::NODE_KEY_UDID, udid, sizeof(udid)); if (ret != DM_OK) { LOGE("GetNodeKeyInfo failed"); return; diff --git a/services/devicemanagerservice/src/devicestate/dm_device_state_manager.cpp b/services/devicemanagerservice/src/devicestate/dm_device_state_manager.cpp index b5288ccb0..8fc7214ac 100644 --- a/services/devicemanagerservice/src/devicestate/dm_device_state_manager.cpp +++ b/services/devicemanagerservice/src/devicestate/dm_device_state_manager.cpp @@ -43,7 +43,7 @@ void DmDeviceStateManager::OnDeviceOnline(const std::string &pkgName, const DmDe LOGE("OnDeviceOnline profile adapter is null"); } else { uint8_t udid[UDID_BUF_LEN] = {0}; - int32_t ret = SoftbusConnector::GetNodeKeyInfoByNetworkId(info.deviceId, NodeDeivceInfoKey::NODE_KEY_UDID, udid, + int32_t ret = SoftbusConnector::GetNodeKeyInfoByNetworkId(info.deviceId, NodeDeviceInfoKey::NODE_KEY_UDID, udid, sizeof(udid)); if (ret != DM_OK) { LOGE("DmDeviceStateManager::OnDeviceOnline GetNodeKeyInfo failed"); diff --git a/test/unittest/mock/softbus_bus_center.cpp b/test/unittest/mock/softbus_bus_center.cpp index 47385bc4a..9998102d3 100644 --- a/test/unittest/mock/softbus_bus_center.cpp +++ b/test/unittest/mock/softbus_bus_center.cpp @@ -15,7 +15,7 @@ #include "softbus_connector.h" -int32_t GetNodeKeyInfo(const char *pkgName, const char *networkId, NodeDeivceInfoKey key, uint8_t *info, +int32_t GetNodeKeyInfo(const char *pkgName, const char *networkId, NodeDeviceInfoKey key, uint8_t *info, int32_t infoLen) { return 0; -- Gitee