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

Commit 5a25c6ca authored by Chris Manton's avatar Chris Manton
Browse files

btif::dm::le_adv Properly type status as advertising status

Bug: 351251714
Test: m .
Flag: EXEMPT, Type specialization
Change-Id: Ia3f1fc4ed80742c20843b0c3f2d63a0eb8c9dfb1
parent fda9914a
Loading
Loading
Loading
Loading
+9 −8
Original line number Original line Diff line number Diff line
@@ -3063,9 +3063,10 @@ static void get_address_callback(tBT_TRANSPORT transport, bool is_valid, const O


// Step Three: CallBack from Step Two, advertise and get address
// Step Three: CallBack from Step Two, advertise and get address
static void start_advertising_callback(uint8_t id, tBT_TRANSPORT transport, bool is_valid,
static void start_advertising_callback(uint8_t id, tBT_TRANSPORT transport, bool is_valid,
                                       const Octet16& c, const Octet16& r, tBTM_STATUS status) {
                                       const Octet16& c, const Octet16& r,
  if (status != 0) {
                                       uint8_t advertising_status) {
    log::info("OOB get advertiser ID failed with status {}", status);
  if (advertising_status != 0) {
    log::info("OOB get advertiser ID failed with status {}", advertising_status);
    GetInterfaceToProfiles()->events->invoke_oob_data_request_cb(transport, false, c, r,
    GetInterfaceToProfiles()->events->invoke_oob_data_request_cb(transport, false, c, r,
                                                                 RawAddress{}, 0x00);
                                                                 RawAddress{}, 0x00);
    SMP_ClearLocScOobData();
    SMP_ClearLocScOobData();
@@ -3078,8 +3079,8 @@ static void start_advertising_callback(uint8_t id, tBT_TRANSPORT transport, bool
  advertiser->GetOwnAddress(id, base::Bind(&get_address_callback, transport, is_valid, c, r));
  advertiser->GetOwnAddress(id, base::Bind(&get_address_callback, transport, is_valid, c, r));
}
}


static void timeout_cb(uint8_t id, tBTM_STATUS status) {
static void timeout_cb(uint8_t id, uint8_t advertising_status) {
  log::info("OOB advertiser with id {} timed out with status {}", id, status);
  log::info("OOB advertiser with id {} timed out with status {}", id, advertising_status);
  auto advertiser = bluetooth::shim::get_ble_advertiser_instance();
  auto advertiser = bluetooth::shim::get_ble_advertiser_instance();
  advertiser->Unregister(id);
  advertiser->Unregister(id);
  SMP_ClearLocScOobData();
  SMP_ClearLocScOobData();
@@ -3089,9 +3090,9 @@ static void timeout_cb(uint8_t id, tBTM_STATUS status) {


// Step Two: CallBack from Step One, advertise and get address
// Step Two: CallBack from Step One, advertise and get address
static void id_status_callback(tBT_TRANSPORT transport, bool is_valid, const Octet16& c,
static void id_status_callback(tBT_TRANSPORT transport, bool is_valid, const Octet16& c,
                               const Octet16& r, uint8_t id, tBTM_STATUS status) {
                               const Octet16& r, uint8_t id, uint8_t advertising_status) {
  if (status != 0) {
  if (advertising_status != 0) {
    log::info("OOB get advertiser ID failed with status {}", status);
    log::info("OOB get advertiser ID failed with status {}", advertising_status);
    GetInterfaceToProfiles()->events->invoke_oob_data_request_cb(transport, false, c, r,
    GetInterfaceToProfiles()->events->invoke_oob_data_request_cb(transport, false, c, r,
                                                                 RawAddress{}, 0x00);
                                                                 RawAddress{}, 0x00);
    SMP_ClearLocScOobData();
    SMP_ClearLocScOobData();