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

Commit 80196790 authored by Chris Manton's avatar Chris Manton
Browse files

gd: Unregister events at the hci layer

bt_headless with the pairing option fails

Bug:149524116
Test: blueooth_test_gd
Test: bt_headless
Change-Id: I65d9f928c6ff63e5ddde8380cae847d180876fac
parent 4d47be04
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -206,6 +206,13 @@ struct HciLayer::impl : public hal::HciHalCallbacks {

  void Stop() {
    hal_->unregisterIncomingPacketCallback();
    UnregisterEventHandler(EventCode::COMMAND_COMPLETE);
    UnregisterEventHandler(EventCode::COMMAND_STATUS);
    UnregisterEventHandler(EventCode::LE_META_EVENT);
    UnregisterEventHandler(EventCode::PAGE_SCAN_REPETITION_MODE_CHANGE);
    UnregisterEventHandler(EventCode::MAX_SLOTS_CHANGE);
    UnregisterEventHandler(EventCode::VENDOR_SPECIFIC);

    acl_queue_.GetDownEnd()->UnregisterDequeue();
    incoming_acl_packet_buffer_.Clear();
    delete hci_timeout_alarm_;