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

Skip to content
Commit 1bdbe93c authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Make AdvertiseManager shutdown gracefully

If the Bluetooth stack is shutdown while AdvertiseManager has a pending HCI
operation being executed, the callback to that operation might be
executed after the manager was deleted. In order to fix any potential
issues, always use a weak pointer to the advertisement manager. This will
prevent the callbacks from getting executed.

In case of callbacks that are not executed on the AdvertiseManager
instance, one can check if the weak pointer is still valid, and properly
handle the stack shutdown.

Test: BleAdvertisingManagerTest:test_cleanup_during_execution
Change-Id: I8d33de4f64267a880880082c5498375c083addef
parent e155d2af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment