Merge branch 'google3' to master, roll forward up to cl/355302206.

This commit is contained in:
hai007
2021-02-04 13:34:05 -08:00
41 changed files with 1194 additions and 472 deletions
+9 -2
View File
@@ -317,8 +317,8 @@ bool WifiLanMedium::StopAcceptingConnections(const std::string& service_id) {
}
std::unique_ptr<api::WifiLanSocket> WifiLanMedium::Connect(
api::WifiLanService& remote_wifi_lan_service,
const std::string& service_id) {
api::WifiLanService& remote_wifi_lan_service, const std::string& service_id,
CancellationFlag* cancellation_flag) {
NEARBY_LOG(
INFO,
"G3 WifiLan Connect: medium=%p, wifi_lan_service=%p, "
@@ -354,6 +354,13 @@ std::unique_ptr<api::WifiLanSocket> WifiLanMedium::Connect(
}
}
if (cancellation_flag->Cancelled()) {
NEARBY_LOGS(INFO) << "G3 WifiLan Connect: Has been cancelled: "
"service_id="
<< service_id;
return {};
}
WifiLanService wifi_lan_service =
static_cast<WifiLanService&>(remote_wifi_lan_service);
auto socket = std::make_unique<WifiLanSocket>(&wifi_lan_service);