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

Commit b39ad5c7 authored by Andre Eisenbach's avatar Andre Eisenbach
Browse files

Do not log unsolicited NOOP command complete events

Bug: 27744135
Change-Id: I683e3a9f0a116f83763ebcf4d0583ea1c89ef5b2
parent 39669ea4
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -663,12 +663,17 @@ static bool filter_incoming_event(BT_HDR *packet) {
    STREAM_TO_UINT16(opcode, stream);

    wait_entry = get_waiting_command(opcode);
    if (!wait_entry)
      LOG_WARN(LOG_TAG, "%s command complete event with no matching command. opcode: 0x%x.", __func__, opcode);
    else if (wait_entry->complete_callback)
    if (!wait_entry) {
      // TODO: Currently command_credits aren't parsed at all; here or in higher layers...
      if (opcode != HCI_COMMAND_NONE) {
        LOG_WARN(LOG_TAG, "%s command complete event with no matching command (opcode: 0x%04x).",
            __func__, opcode);
      }
    } else if (wait_entry->complete_callback) {
      wait_entry->complete_callback(packet, wait_entry->context);
    else if (wait_entry->complete_future)
    } else if (wait_entry->complete_future) {
      future_ready(wait_entry->complete_future, packet);
    }

    goto intercepted;
  } else if (event_code == HCI_COMMAND_STATUS_EVT) {