diff --git a/services/devicemanagerservice/include/dependency/softbus/softbus_connector.h b/services/devicemanagerservice/include/dependency/softbus/softbus_connector.h index ba60b083ddd6e6ded39aa71b10f1023069f0a533..a7f5f3aa7a9c193955841495ec4693df583cdb06 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 fba292bf6689f1101a600f70d126d11f8ef3ccf7..2805e98ab691cf3c4bde1a3b792610dc008288e7 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 4137339229c406342a6e13d77446dd981972f045..4ece01e321d9abed10799d25318b18acd538fada 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 b5288ccb0f4516c927880d7fa1f25525344e3a8b..8fc7214ac674ccef47a525787d456057e7b471c0 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 47385bc4a2a2f6e7bfd1c64f905ee0e95bb5430b..9998102d324ed597dfef7406a496c1297ec5da23 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;