Skip to content

Commit 9cf53e9

Browse files
hai007copybara-github
authored andcommitted
Wi-Fi Direct Service Implementation(8.3)
PiperOrigin-RevId: 843969255
1 parent 1ac3538 commit 9cf53e9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

connections/implementation/wifi_direct_bwu_handler.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ WifiDirectBwuHandler::CreateUpgradedEndpointChannel(
160160
LOG(INFO) << "Received WifiDirect credential SSID: " << ssid
161161
<< ", Password: " << masker::Mask(password)
162162
<< ", Port: " << port << ", Gateway: " << gateway
163-
<< ", Frequency: " << freq;
163+
<< ", Frequency: " << freq
164+
<< ". SSID/PASSWORD auth type is not supported, return";
165+
return {Error(
166+
OperationResultCode::CONNECTIVITY_WIFI_DIRECT_INVALID_CREDENTIAL)};
164167
}
165168

166169
if (!wifi_direct_medium_.ConnectWifiDirect(wifi_direct_credentials)) {

internal/platform/implementation/windows/wifi_direct_medium.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ bool WifiDirectMedium::StartWifiDirect(
316316

317317
try {
318318
advertiser_.Start();
319-
LOG(INFO) << "Start WifiDirect GO succeeded. Status: "
319+
LOG(INFO) << "Start WifiDirect GO Status: "
320320
<< (int)advertiser_.AdvertisementStatus();
321321
if ((advertiser_.AdvertisementStatus() ==
322322
WiFiDirectServiceAdvertisementStatus::Created) ||
@@ -555,6 +555,10 @@ bool WifiDirectMedium::ConnectWifiDirect(
555555
}
556556

557557
credentials_gc_ = credentials;
558+
if (credentials_gc_.GetServiceName().empty()) {
559+
LOG(ERROR) << "GC: Service name is empty, return false";
560+
return false;
561+
}
558562
winrt::hstring device_selector = WiFiDirectService::GetSelector(
559563
winrt::to_hstring(credentials_gc_.GetServiceName()));
560564
const winrt::param::iterable<winrt::hstring> requested_properties =

0 commit comments

Comments
 (0)