改动ParseMacMap

Signed-off-by: yanghui <yanghui152@huawei.com>
This commit is contained in:
yanghui 2023-11-29 07:49:10 +00:00 committed by Gitee
parent 03a54347fa
commit a47aef7732
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -427,7 +427,7 @@ void NetworkXmlParser::ParseNetworkList(xmlNodePtr innode)
WIFI_LOGI("ParseNetworkList size[%{public}lu]", (unsigned long) wifiConfigs.size());
}
void NetworkXmlParser::SetMacMap()
void NetworkXmlParser::ParseMacMap()
{
WifiStoreRandomMac wifiStoreRandomMac{};
for (auto wifiConfig : wifiConfigs) {
@ -452,6 +452,7 @@ bool NetworkXmlParser::ParseInternal(xmlNodePtr node)
return false;
}
ParseNetworkList(node);
ParseMacMap();
return true;
}
@ -480,7 +481,6 @@ std::vector<WifiDeviceConfig> NetworkXmlParser::GetNetworks()
std::vector<WifiStoreRandomMac> NetworkXmlParser::GetRandomMacmap()
{
SetMacMap();
return wifiStoreRandomMacs;
}
}