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

Commit ee61f7e6 authored by Hsin-chen Chuang's avatar Hsin-chen Chuang
Browse files

floss: Mark controller as broken if we got INVALID_FD in Start()

This avoid crashing on sendHciCommand

Bug: 372336294
Tag: #floss
Test: mmm packages/modules/Bluetooth
Flag: EXEMPT, Floss-only change
Change-Id: Ifa1c50fe5e0e5344a0e252d5a3132570929dd60c
parent e4f55827
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -339,6 +339,7 @@ protected:
    // We don't want to crash when the chipset is broken.
    if (sock_fd_ == INVALID_FD) {
      log::error("Failed to connect to HCI socket. Aborting HAL initialization process.");
      controller_broken_ = true;
      kill(getpid(), SIGTERM);
      return;
    }