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

Commit e1292f61 authored by Chris Manton's avatar Chris Manton
Browse files

Log command status error conditions

Bug: 182524282
Test: Manual verification on failing scenario
Tag: #refactor
Change-Id: Ia76e97648c8091e2bde5a26b307d2779c21e6640
parent 210d9ebf
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -123,6 +123,17 @@ struct HciLayer::impl {
  }

  void on_command_status(EventView event) {
    CommandStatusView response_view = CommandStatusView::Create(event);
    ASSERT(response_view.IsValid());
    OpCode op_code = response_view.GetCommandOpCode();
    ErrorCode status = response_view.GetStatus();
    if (status != ErrorCode::SUCCESS) {
      LOG_ERROR(
          "Received UNEXPECTED command status:%s opcode:0x%02hx (%s)",
          ErrorCodeText(status).c_str(),
          op_code,
          OpCodeText(op_code).c_str());
    }
    handle_command_response<CommandStatusView>(event, "status");
  }