Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment