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

Commit 0a8db98e authored by David Duarte's avatar David Duarte Committed by Automerger Merge Worker
Browse files

Merge "Revert "Provide correct disconnection error code"" am: df2841d7 am: 98810d21

parents 94cf25d7 98810d21
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -5420,8 +5420,7 @@ ErrorCode LinkLayerController::Disconnect(uint16_t handle, ErrorCode reason) {

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

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

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

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

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