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

Commit 63896bee authored by Hui Peng's avatar Hui Peng Committed by Automerger Merge Worker
Browse files

Merge "Fix an OOB bug in btm_ble_write_adv_enable_complete" into tm-dev am:...

Merge "Fix an OOB bug in btm_ble_write_adv_enable_complete" into tm-dev am: 96c12159 am: 8faadd25

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/20812095



Change-Id: Ibeec363e2d698c2a83e34132b47f387b127f9dcc
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 60ea271f 8faadd25
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3232,11 +3232,11 @@ void btm_ble_read_remote_features_complete(uint8_t* p) {
 * Returns          void
 *
 ******************************************************************************/
void btm_ble_write_adv_enable_complete(uint8_t* p) {
void btm_ble_write_adv_enable_complete(uint8_t* p, uint16_t evt_len) {
  tBTM_BLE_INQ_CB* p_cb = &btm_cb.ble_ctr_cb.inq_var;

  /* if write adv enable/disbale not succeed */
  if (*p != HCI_SUCCESS) {
  if (evt_len < 1 || *p != HCI_SUCCESS) {
    /* toggle back the adv mode */
    p_cb->adv_mode = !p_cb->adv_mode;
  }
+1 −1
Original line number Diff line number Diff line
@@ -1234,7 +1234,7 @@ static void btu_hcif_hdl_command_complete(uint16_t opcode, uint8_t* p,
      break;

    case HCI_BLE_WRITE_ADV_ENABLE:
      btm_ble_write_adv_enable_complete(p);
      btm_ble_write_adv_enable_complete(p, evt_len);
      break;

    case HCI_BLE_CREATE_LL_CONN:
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ void btm_ble_process_ext_adv_pkt(uint8_t len, const uint8_t* p);
void btm_ble_process_phy_update_pkt(uint8_t len, uint8_t* p);
void btm_ble_read_remote_features_complete(uint8_t* p);
void btm_le_on_advertising_set_terminated(uint8_t* p, uint16_t length);
extern void btm_ble_write_adv_enable_complete(uint8_t* p);
extern void btm_ble_write_adv_enable_complete(uint8_t* p, uint16_t evt_len);
extern void btm_ble_create_ll_conn_complete(tHCI_STATUS status);
extern void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8],
                                uint16_t ediv);
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ void btm_ble_update_mode_operation(uint8_t link_role, const RawAddress* bd_addr,
                                   tHCI_STATUS status) {
  mock_function_count_map[__func__]++;
}
void btm_ble_write_adv_enable_complete(uint8_t* p) {
void btm_ble_write_adv_enable_complete(uint8_t* p, uint16_t evt_len) {
  mock_function_count_map[__func__]++;
}
void btm_clear_all_pending_le_entry(void) {