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

Commit d67eb600 authored by Yun-Hao Chung's avatar Yun-Hao Chung Committed by Yun-hao Chung
Browse files

Floss: Improve the logging in finding HCI interface

The error message was mistakenly logged in success case. This fixes it
and also includes the number of index found into the message to help
future debugging.

Bug: 357792559
Tag: #floss
Test: mmm packages/modules/Bluetooth
Test: manually
Flag: EXEMPT, Floss-only changes

Change-Id: I519ffa09ae3ebee3b08849ac030641d5b9d90ee0
parent 9353d5a3
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -168,9 +168,12 @@ int waitHciDev(int hci_interface) {
            }
          }

          if (ret != 0) {
            // Chipset might be lost. Wait for index added event.
          bluetooth::log::error("HCI interface({}) not found in the MGMT lndex list",
                                hci_interface);
            bluetooth::log::error(
                    "MGMT index list returns {} HCI interfaces, but HCI interface({}) is not found",
                    cc->num_intf, hci_interface);
          }
        } else {
          // Unlikely event (probably developer error or driver shut down).
          bluetooth::log::error("Failed to read index list: status({})", cc->status);