修改p2p/gc组无法删除

Signed-off-by: l30052082 <lihui410@huawei.com>
This commit is contained in:
l30052082 2023-11-30 14:15:18 +08:00
parent dc22917da9
commit 71720f3276

View File

@ -451,7 +451,13 @@ ErrCode WifiP2pServiceImpl::RemoveGroup()
WIFI_LOGE("Get P2P service failed!"); WIFI_LOGE("Get P2P service failed!");
return WIFI_OPT_P2P_NOT_OPENED; return WIFI_OPT_P2P_NOT_OPENED;
} }
WifiP2pGroupInfo config;
ErrCode ret = pService->GetCurrentGroup(config);
if (ret != WIFI_OPT_SUCCESS) {
WIFI_LOGE("RemoveGroup:GetCurrentGroup failed!");
pService->RemoveGroup();
return WIFI_OPT_FAILED;
}
return pService->RemoveGroup(); return pService->RemoveGroup();
} }