!3364 fix master P2p Open Session failed

Merge pull request !3364 from xionglei/master
This commit is contained in:
openharmony_ci 2024-11-20 03:25:13 +00:00 committed by Gitee
commit e3afe0e083
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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();