Fix race conditions with bluetooth devices being erased while being used.

This commit is contained in:
Vibhav Pant
2023-09-26 18:34:56 +05:30
parent b4bd7ddbb8
commit 97af86a414
10 changed files with 135 additions and 157 deletions
@@ -37,7 +37,7 @@ BluetoothClassicMedium::BluetoothClassicMedium(BluetoothAdapter &adapter)
adapter_(adapter),
observers_(std::make_shared<ObserverList<Observer>>()),
devices_(std::make_shared<BluetoothDevices>(
*system_bus_, adapter.GetObjectPath(), *observers_)),
system_bus_, adapter.GetObjectPath(), *observers_)),
device_watcher_(nullptr),
profile_manager_(
std::make_unique<ProfileManager>(*system_bus_, *devices_)) {}