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

Commit 51c98cd8 authored by Martin Brabham's avatar Martin Brabham
Browse files

SM: Reset fixed channel service pointer so we could continue

Bug:
Test: bluetooth_test_gd
Change-Id: I326ee8f8206d139fadb4585a47832e2a0416dd4a
parent 3e4963b6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ SecurityManagerChannel::~SecurityManagerChannel() {
  if (fixed_channel_service_ != nullptr) {
    fixed_channel_service_->Unregister(common::Bind(&SecurityManagerChannel::OnUnregistered, common::Unretained(this)),
                                       handler_);
    fixed_channel_service_.reset();
  }
}

@@ -132,7 +133,6 @@ void SecurityManagerChannel::OnConnectionFail(hci::Address address,
            result.connection_result_code);
  auto entry = fixed_channel_map_.find(address);
  if (entry != fixed_channel_map_.end()) {
    entry->second->Release();
    entry->second.reset();
    fixed_channel_map_.erase(entry);
  }
@@ -144,7 +144,6 @@ void SecurityManagerChannel::OnConnectionClose(hci::Address address, hci::ErrorC
  LOG_ERROR("Connection closed due to: %s", hci::ErrorCodeText(error_code).c_str());
  auto entry = fixed_channel_map_.find(address);
  if (entry != fixed_channel_map_.end()) {
    entry->second->Release();
    entry->second.reset();
    fixed_channel_map_.erase(entry);
  }