Description: project bug fix

Match-id-63ce652c9b336c0b7125e440a9ae1be54d7b9d1f
This commit is contained in:
xxxx
2022-08-23 15:21:24 +08:00
parent baf1da2366
commit b3e979b5d3
17 changed files with 60 additions and 7 deletions
+11
View File
@@ -61,6 +61,17 @@ std::string GetLocalNetworkId()
return GetLocalDeviceInfo().networkId;
}
std::string GetUUIDBySoftBus(const std::string &networkId)
{
if (networkId.empty()) {
return "";
}
char uuid[UUID_BUF_LEN] = {0};
auto ret = GetNodeKeyInfo(DINPUT_PKG_NAME.c_str(), networkId.c_str(), NodeDeviceInfoKey::NODE_KEY_UUID,
reinterpret_cast<uint8_t *>(uuid), UUID_BUF_LEN);
return (ret == DH_SUCCESS) ? std::string(uuid) : "";
}
uint64_t GetCurrentTime()
{
constexpr int32_t usOneSecond = 1000 * 1000;