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

Commit df2841d7 authored by David Duarte's avatar David Duarte Committed by Gerrit Code Review
Browse files

Merge "Revert "Provide correct disconnection error code""

parents 1c57cd55 dd1a1ba7
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(