Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13054e83 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "[BluetoothMetrics] Adding a mutex for LE Connection Metrics Remote Device."

parents 99d436ee d835d553
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@ void LEConnectionMetricsRemoteDevice::AddStateChangedEvent(
    return;
  }

  std::unique_lock<std::mutex> lock(le_connection_metrics_remote_device_guard);
  auto it = opened_devices.find(address);
  if (it == opened_devices.end()) {
    device_metrics.push_back(std::make_unique<LEConnectionMetricState>(address));
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ class LEConnectionMetricsRemoteDevice {
  void UploadLEConnectionSession(const hci::Address& address);

 private:
  mutable std::mutex le_connection_metrics_remote_device_guard;
  std::vector<std::unique_ptr<LEConnectionMetricState>> device_metrics;
  std::unordered_map<hci::Address, LEConnectionMetricState*> opened_devices;
  BaseMetricsLoggerModule* metrics_logger_module;