fix master P2p Open Session failed

Signed-off-by: xionglei <xionglei3@huawei.com>
This commit is contained in:
xionglei 2024-11-20 09:44:23 +08:00
parent 41ce37dd70
commit f91be224a9
2 changed files with 7 additions and 3 deletions

View File

@ -1647,7 +1647,11 @@ ErrCode WifiP2pProxy::Hid2dSetPeerWifiCfgInfo(PeerCfgType cfgType,
if (exception) {
return WIFI_OPT_FAILED;
}
return ErrCode(reply.ReadInt32());
int ret = reply.ReadInt32();
if (ErrCode(ret) != WIFI_OPT_SUCCESS) {
return ErrCode(ret);
}
return WIFI_OPT_SUCCESS;
}
ErrCode WifiP2pProxy::Hid2dSetUpperScene(const std::string& ifName, const Hid2dUpperScene& scene)

View File

@ -1390,7 +1390,7 @@ ErrCode WifiP2pServiceImpl::Hid2dSetPeerWifiCfgInfo(PeerCfgType cfgType,
IEnhanceService *pEnhanceService = WifiServiceManager::GetInstance().GetEnhanceServiceInst();
if (pEnhanceService == nullptr) {
WIFI_LOGE("Get pEnhanceService service failed!");
return WIFI_OPT_FAILED;
return WIFI_OPT_GET_ENHANCE_SVC_FAILED;
}
if (pEnhanceService->Hid2dSetPeerWifiCfgInfo(cfgType, cfgData, setDataValidLen) != WIFI_OPT_SUCCESS) {
@ -1543,7 +1543,7 @@ ErrCode WifiP2pServiceImpl::Hid2dIsWideBandwidthSupported(bool &isSupport)
IEnhanceService *pEnhanceService = WifiServiceManager::GetInstance().GetEnhanceServiceInst();
if (pEnhanceService == nullptr) {
WIFI_LOGE("Hid2dIsWideBandwidthSupported get pEnhanceService service failed!");
return WIFI_OPT_FAILED;
return WIFI_OPT_GET_ENHANCE_SVC_FAILED;
}
isSupport = pEnhanceService->IsWideBandwidthSupported();