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

Commit 5fbc78fd authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Report proper advertiser status on registration error"

parents a7da97f0 b938d728
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ class BleAdvertisingManagerImpl
    }

    LOG(INFO) << "no free advertiser instance";
    cb.Run(0xFF, BTM_BLE_MULTI_ADV_FAILURE);
    cb.Run(0xFF, ADVERTISE_FAILED_TOO_MANY_ADVERTISERS);
  }

  void StartAdvertising(uint8_t advertiser_id, MultiAdvCb cb,
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@

#define BTM_BLE_MULTI_ADV_SUCCESS 0
#define BTM_BLE_MULTI_ADV_FAILURE 1
#define ADVERTISE_FAILED_TOO_MANY_ADVERTISERS 0x02

using MultiAdvCb = base::Callback<void(uint8_t /* status */)>;

+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ TEST_F(BleAdvertisingManagerTest, test_registration) {
  // This call should return an error - no more advertisers left.
  BleAdvertisingManager::Get()->RegisterAdvertiser(base::Bind(
      &BleAdvertisingManagerTest::RegistrationCb, base::Unretained(this)));
  EXPECT_EQ(BTM_BLE_MULTI_ADV_FAILURE, reg_status);
  EXPECT_EQ(ADVERTISE_FAILED_TOO_MANY_ADVERTISERS, reg_status);
  // Don't bother checking inst_id, it doesn't matter

  // This will currently trigger a mock message about a call to Enable(). This