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

Commit a0ff0533 authored by Md Shahriar Hossain Sajib's avatar Md Shahriar Hossain Sajib Committed by Gerrit Code Review
Browse files

Merge changes from topic "mainline_b2"

* changes:
  Deinitialize rfcomm in the right order
  fix DUAL bonded address maping
  log privacy mode of device
parents 153a4e50 ba156ce0
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -129,7 +129,6 @@ bt_status_t btsock_rfc_init(int poll_thread_handle, uid_set_t* set) {


void btsock_rfc_cleanup(void) {
void btsock_rfc_cleanup(void) {
  pth = -1;
  pth = -1;
  uid_set = NULL;


  BTA_JvDisable();
  BTA_JvDisable();


@@ -139,6 +138,8 @@ void btsock_rfc_cleanup(void) {
    list_free(rfc_slots[i].incoming_queue);
    list_free(rfc_slots[i].incoming_queue);
    rfc_slots[i].incoming_queue = NULL;
    rfc_slots[i].incoming_queue = NULL;
  }
  }

  uid_set = NULL;
}
}


static rfc_slot_t* find_free_slot(void) {
static rfc_slot_t* find_free_slot(void) {
+0 −1
Original line number Original line Diff line number Diff line
@@ -91,7 +91,6 @@ void BTM_SecAddBleDevice(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type,
  p_dev_rec->device_type |= dev_type;
  p_dev_rec->device_type |= dev_type;
  p_dev_rec->ble.ble_addr_type = addr_type;
  p_dev_rec->ble.ble_addr_type = addr_type;


  p_dev_rec->ble.pseudo_addr = bd_addr;
  /* sync up with the Inq Data base*/
  /* sync up with the Inq Data base*/
  tBTM_INQ_INFO* p_info = BTM_InqDbRead(bd_addr);
  tBTM_INQ_INFO* p_info = BTM_InqDbRead(bd_addr);
  if (p_info) {
  if (p_info) {
+3 −1
Original line number Original line Diff line number Diff line
@@ -701,7 +701,7 @@ void BTM_BleReadControllerFeatures(
bool BTM_BleConfigPrivacy(bool privacy_mode) {
bool BTM_BleConfigPrivacy(bool privacy_mode) {
  tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb;
  tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb;


  BTM_TRACE_EVENT("%s", __func__);
  BTM_TRACE_WARNING("%s %d", __func__, (int)privacy_mode);


  /* if LE is not supported, return error */
  /* if LE is not supported, return error */
  if (!controller_get_interface()->supports_ble()) return false;
  if (!controller_get_interface()->supports_ble()) return false;
@@ -727,6 +727,8 @@ bool BTM_BleConfigPrivacy(bool privacy_mode) {
    } else /* 4.1/4.0 controller */
    } else /* 4.1/4.0 controller */
      p_cb->privacy_mode = BTM_PRIVACY_1_1;
      p_cb->privacy_mode = BTM_PRIVACY_1_1;
  }
  }
  VLOG(2) << __func__ << " privacy_mode: " << p_cb->privacy_mode
          << " own_addr_type: " << p_cb->addr_mgnt_cb.own_addr_type;


  GAP_BleAttrDBUpdate(GATT_UUID_GAP_CENTRAL_ADDR_RESOL, &gap_ble_attr_value);
  GAP_BleAttrDBUpdate(GATT_UUID_GAP_CENTRAL_ADDR_RESOL, &gap_ble_attr_value);