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

Commit 88a96bc7 authored by Henri Chataing's avatar Henri Chataing Committed by Automerger Merge Worker
Browse files

Merge "Provide correct disconnection error code" am: 5346a3bc

parents 645f02b7 5346a3bc
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -5420,7 +5420,8 @@ ErrorCode LinkLayerController::Disconnect(uint16_t handle, ErrorCode reason) {

    connections_.Disconnect(
        handle, [this](TaskId task_id) { CancelScheduledTask(task_id); });
    SendDisconnectionCompleteEvent(handle, reason);
    SendDisconnectionCompleteEvent(
        handle, ErrorCode::CONNECTION_TERMINATED_BY_LOCAL_HOST);
    return ErrorCode::SUCCESS;
  }

@@ -5441,7 +5442,8 @@ ErrorCode LinkLayerController::Disconnect(uint16_t handle, ErrorCode reason) {

      connections_.Disconnect(
          sco_handle, [this](TaskId task_id) { CancelScheduledTask(task_id); });
      SendDisconnectionCompleteEvent(sco_handle, reason);
      SendDisconnectionCompleteEvent(
          sco_handle, ErrorCode::CONNECTION_TERMINATED_BY_LOCAL_HOST);
    }

    SendLinkLayerPacket(model::packets::DisconnectBuilder::Create(
@@ -5456,7 +5458,8 @@ ErrorCode LinkLayerController::Disconnect(uint16_t handle, ErrorCode reason) {

  connections_.Disconnect(
      handle, [this](TaskId task_id) { CancelScheduledTask(task_id); });
  SendDisconnectionCompleteEvent(handle, ErrorCode(reason));
  SendDisconnectionCompleteEvent(
      handle, ErrorCode::CONNECTION_TERMINATED_BY_LOCAL_HOST);
#ifdef ROOTCANAL_LMP
  if (is_br_edr) {
    ASSERT(link_manager_remove_link(