mirror of
https://gitee.com/openharmony/xts_dcts
synced 2024-11-23 15:50:20 +00:00
commit
11666ba31e
5
communication/softbus_standard/common/wifi_utils.cpp
Normal file → Executable file
5
communication/softbus_standard/common/wifi_utils.cpp
Normal file → Executable file
@ -118,14 +118,15 @@ int WiFiUtils::ConnectTo(const std::string& ssid, const std::string& passwd)
|
||||
deviceConfig.preSharedKey = passwd;
|
||||
deviceConfig.keyMgmt = "WPA-PSK";
|
||||
int netId;
|
||||
int ret = wifiDevicePtr->AddDeviceConfig(deviceConfig, netId);
|
||||
bool isCandidate = false;
|
||||
int ret = wifiDevicePtr->AddDeviceConfig(deviceConfig, netId, isCandidate);
|
||||
if (ret != SOFTBUS_OK) {
|
||||
LOG("[wifi]call AddDeviceConfig fail, ret:%d", ret);
|
||||
} else {
|
||||
LOG("[wifi]call AddDeviceConfig success, netId:%d", netId);
|
||||
}
|
||||
|
||||
ret = wifiDevicePtr->ConnectToNetwork(netId);
|
||||
ret = wifiDevicePtr->ConnectToNetwork(netId, isCandidate);
|
||||
if (ret != SOFTBUS_OK) {
|
||||
LOG("[wifi]call ConnectTo fail, ret:%d", ret);
|
||||
return SOFTBUS_ERR;
|
||||
|
@ -51,4 +51,6 @@ ohos_moduletest_suite("dsoftbusTest") {
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
external_deps = [ "dsoftbus:softbus_client" ]
|
||||
subsystem_name = "communication"
|
||||
part_name = "dsoftbus"
|
||||
}
|
||||
|
@ -51,4 +51,6 @@ ohos_moduletest_suite("DctsSoftBusTransReliabilityTest") {
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
external_deps = [ "dsoftbus:softbus_client" ]
|
||||
subsystem_name = "communication"
|
||||
part_name = "dsoftbus"
|
||||
}
|
||||
|
@ -51,4 +51,6 @@ ohos_moduletest_suite("DctsSoftBusTransFileFunTest") {
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
external_deps = [ "dsoftbus:softbus_client" ]
|
||||
subsystem_name = "communication"
|
||||
part_name = "dsoftbus"
|
||||
}
|
||||
|
@ -50,4 +50,6 @@ ohos_moduletest_suite("DctsSoftBusTransFunTest") {
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
external_deps = [ "dsoftbus:softbus_client" ]
|
||||
subsystem_name = "communication"
|
||||
part_name = "dsoftbus"
|
||||
}
|
||||
|
@ -51,4 +51,6 @@ ohos_moduletest_suite("DctsSoftBusTransStreamFunTest") {
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
external_deps = [ "dsoftbus:softbus_client" ]
|
||||
subsystem_name = "communication"
|
||||
part_name = "dsoftbus"
|
||||
}
|
||||
|
@ -50,4 +50,6 @@ ohos_moduletest_suite("DctsSoftBusTransSessionFunTest") {
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
external_deps = [ "dsoftbus:softbus_client" ]
|
||||
subsystem_name = "communication"
|
||||
part_name = "dsoftbus"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user