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

Commit dd1a1ba7 authored by Thomas Girardier's avatar Thomas Girardier Committed by Gerrit Code Review
Browse files

Revert "Provide correct disconnection error code"

This reverts commit fba7ff94.

Reason for revert: broke PTS-bot HID/HOS/HCE/BV-03-I and HID/HOS/HCE/BV-04-I

Change-Id: I137e24e7c7c844170689a87afdf8e4a374c7e080
parent fba7ff94
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(