mirror of
https://gitee.com/openharmony/castengine_cast_framework
synced 2024-11-27 00:21:04 +00:00
update service/src/device_manager/src/discovery_manager.cpp.
codecheck Signed-off-by: LongestDistance <cdwango@isoftstone.com>
This commit is contained in:
parent
816cc3bbae
commit
c677e70d1b
@ -375,12 +375,12 @@ void DiscoveryManager::NotifyDeviceIsOnline(const DmDeviceInfo &dmDeviceInfo)
|
||||
void DiscoveryManager::ParseDeviceInfo(const DmDeviceInfo &dmDevice, CastInnerRemoteDevice &castDevice)
|
||||
{
|
||||
CLOGD("dm device extraData parse, %s", dmDevice.extraData.c_str());
|
||||
|
||||
std::pair<std::string, std::string> ret = CastDeviceDataManager::GetInstance()
|
||||
.GetDeviceNameByDeviceId(dmDevice.deviceId);
|
||||
std::string deviceName = ret.first.empty() ? "" : ret.first;
|
||||
std::string discoveryType = ret.second.empty() ? "" : ret.second;
|
||||
json jsonObj = json::parse(dmDevice.extraData, nullptr, false);
|
||||
|
||||
if (jsonObj.is_discarded()) {
|
||||
CLOGE("dm device extraData parse error, %s", dmDevice.extraData.c_str());
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user