update wifi_manage/wifi_sta_sa/wifi_device_mgr_service_impl.cpp.

Signed-off-by: xionglei <xionglei3@huawei.com>
This commit is contained in:
xionglei 2024-09-03 12:29:20 +00:00 committed by Gitee
parent fd4f8c9464
commit 91817e8430
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -26,10 +26,10 @@ DEFINE_WIFILOG_HOTSPOT_LABEL("WifiDeviceMgrServiceImpl");
namespace OHOS {
namespace Wifi {
const std::string EXTENSION_BACKUP = "backup";
const std::string EXTENSION_RESTORE = "restore";
std::mutex WifiDeviceMgrServiceImpl::g_instanceLock;
std::mutex WifiDeviceMgrServiceImpl::g_initMutex;
sptr<WifiDeviceMgrServiceImpl> WifiDeviceMgrServiceImpl::g_instance;
const bool REGISTER_RESULT = SystemAbility::MakeAndRegisterAbility(
WifiDeviceMgrServiceImpl::GetInstance().GetRefPtr());
@ -85,6 +85,7 @@ void WifiDeviceMgrServiceImpl::OnStop()
bool WifiDeviceMgrServiceImpl::Init()
{
std::lock_guard<std::mutex> lock(g_initMutex);
if (!mPublishFlag) {
for (int i = 0; i < STA_INSTANCE_MAX_NUM; i++) {
sptr<WifiDeviceServiceImpl> wifi = new WifiDeviceServiceImpl(i);