mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Automated Code Change
PiperOrigin-RevId: 937162551
This commit is contained in:
@@ -437,7 +437,7 @@ fire_and_forget WifiDirectMedium::OnConnectionRequested(
|
||||
std::make_unique<WifiDirectDeviceDiscovered>(windows_device_info);
|
||||
|
||||
{
|
||||
absl::MutexLock lock(&mutex_);
|
||||
absl::MutexLock lock(mutex_);
|
||||
connection_requested_devices_by_id_[device_id] = std::move(deviceInfoP);
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ fire_and_forget WifiDirectMedium::OnConnectionRequested(
|
||||
std::string remote_ip =
|
||||
winrt::to_string(pair.RemoteHostName().DisplayName());
|
||||
|
||||
absl::MutexLock lock(&mutex_);
|
||||
absl::MutexLock lock(mutex_);
|
||||
wifi_direct_device_ = device;
|
||||
ip_address_local_ = local_ip;
|
||||
ip_address_remote_ = remote_ip;
|
||||
@@ -749,7 +749,7 @@ fire_and_forget WifiDirectMedium::Watcher_DeviceAdded(
|
||||
<< "; device name: " << winrt::to_string(device_info.Name());
|
||||
winrt::hstring device_id = device_info.Id();
|
||||
{
|
||||
absl::MutexLock lock(&mutex_);
|
||||
absl::MutexLock lock(mutex_);
|
||||
if (discovered_devices_by_id_.contains(device_id)) {
|
||||
return winrt::fire_and_forget();
|
||||
}
|
||||
@@ -800,7 +800,7 @@ fire_and_forget WifiDirectMedium::Watcher_DeviceAdded(
|
||||
// Create a WiFiDirectDevice out of this id
|
||||
if (!is_paired) {
|
||||
LOG(INFO) << "GC paired failed!";
|
||||
absl::MutexLock lock(&mutex_);
|
||||
absl::MutexLock lock(mutex_);
|
||||
if (connection_latch_) {
|
||||
connection_latch_->CountDown();
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ void WifiDirectServerSocket::SetIPAddress(std::string ip_address) {
|
||||
|
||||
std::unique_ptr<api::WifiDirectSocket> WifiDirectServerSocket::Accept() {
|
||||
{
|
||||
absl::MutexLock lock(&mutex_);
|
||||
absl::MutexLock lock(mutex_);
|
||||
if (closed_) return nullptr;
|
||||
if (server_socket_accepted_connection_) {
|
||||
LOG(INFO) << "Server socket has already accepted a connection. Return.";
|
||||
@@ -74,7 +74,7 @@ std::unique_ptr<api::WifiDirectSocket> WifiDirectServerSocket::Accept() {
|
||||
LOG(INFO) << "Start to accept connection from WiFiDirect client.";
|
||||
auto client_socket = server_socket_.Accept();
|
||||
|
||||
absl::MutexLock lock(&mutex_);
|
||||
absl::MutexLock lock(mutex_);
|
||||
if (closed_ || client_socket == nullptr) {
|
||||
LOG(INFO) << "Accept server socket failed or closed.";
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user