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

Commit 88a81fe0 authored by Hui Peng's avatar Hui Peng Committed by Gerrit Code Review
Browse files

Merge "[Invisalign2] Modify Argument type of btm_sec_conn_req" into main

parents 5f5be41e 527021bb
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -35,6 +35,7 @@


#include <string>
#include <string>


#include "bt_dev_class.h"
#include "btif/include/btif_storage.h"
#include "btif/include/btif_storage.h"
#include "common/init_flags.h"
#include "common/init_flags.h"
#include "common/metrics.h"
#include "common/metrics.h"
@@ -2048,7 +2049,7 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
 * Returns          void
 * Returns          void
 *
 *
 ******************************************************************************/
 ******************************************************************************/
void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
void btm_sec_conn_req(const RawAddress& bda, const DEV_CLASS dc) {
  tBTM_SEC_DEV_REC* p_dev_rec = nullptr;
  tBTM_SEC_DEV_REC* p_dev_rec = nullptr;


  /* Some device may request a connection before we are done with the HCI_Reset
  /* Some device may request a connection before we are done with the HCI_Reset
@@ -2073,7 +2074,7 @@ void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
  /* Host is not interested or approved connection.  Save BDA and DC and */
  /* Host is not interested or approved connection.  Save BDA and DC and */
  /* pass request to L2CAP */
  /* pass request to L2CAP */
  btm_sec_cb.connecting_bda = bda;
  btm_sec_cb.connecting_bda = bda;
  memcpy(btm_sec_cb.connecting_dc, dc, DEV_CLASS_LEN);
  memcpy(btm_sec_cb.connecting_dc, &dc, DEV_CLASS_LEN);


  p_dev_rec = btm_find_or_alloc_dev(bda);
  p_dev_rec = btm_find_or_alloc_dev(bda);
  p_dev_rec->sm4 |= BTM_SM4_CONN_PEND;
  p_dev_rec->sm4 |= BTM_SM4_CONN_PEND;
+1 −1
Original line number Original line Diff line number Diff line
@@ -452,7 +452,7 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
 * Returns          void
 * Returns          void
 *
 *
 ******************************************************************************/
 ******************************************************************************/
void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc);
void btm_sec_conn_req(const RawAddress& bda, const DEV_CLASS dc);


/*******************************************************************************
/*******************************************************************************
 *
 *
+1 −1
Original line number Original line Diff line number Diff line
@@ -345,7 +345,7 @@ void btm_sec_clear_ble_keys(tBTM_SEC_DEV_REC* p_dev_rec) {
  inc_func_call_count(__func__);
  inc_func_call_count(__func__);
  test::mock::stack_btm_sec::btm_sec_clear_ble_keys(p_dev_rec);
  test::mock::stack_btm_sec::btm_sec_clear_ble_keys(p_dev_rec);
}
}
void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
void btm_sec_conn_req(const RawAddress& bda, const DEV_CLASS dc) {
  inc_func_call_count(__func__);
  inc_func_call_count(__func__);
  test::mock::stack_btm_sec::btm_sec_conn_req(bda, dc);
  test::mock::stack_btm_sec::btm_sec_conn_req(bda, dc);
}
}
+5 −4
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@
#include <string>
#include <string>


// Original included files, if any
// Original included files, if any
#include "bt_dev_class.h"
#include "stack/btm/security_device_record.h"
#include "stack/btm/security_device_record.h"
#include "stack/include/bt_device_type.h"
#include "stack/include/bt_device_type.h"
#include "stack/include/btm_status.h"
#include "stack/include/btm_status.h"
@@ -567,12 +568,12 @@ struct btm_sec_clear_ble_keys {
extern struct btm_sec_clear_ble_keys btm_sec_clear_ble_keys;
extern struct btm_sec_clear_ble_keys btm_sec_clear_ble_keys;


// Name: btm_sec_conn_req
// Name: btm_sec_conn_req
// Params: const RawAddress& bda, uint8_t* dc
// Params: const RawAddress& bda, const DEV_CLASS dc
// Return: void
// Return: void
struct btm_sec_conn_req {
struct btm_sec_conn_req {
  std::function<void(const RawAddress& bda, uint8_t* dc)> body{
  std::function<void(const RawAddress& bda, const DEV_CLASS dc)> body{
      [](const RawAddress& bda, uint8_t* dc) {}};
      [](const RawAddress& bda, const DEV_CLASS dc) {}};
  void operator()(const RawAddress& bda, uint8_t* dc) { body(bda, dc); };
  void operator()(const RawAddress& bda, const DEV_CLASS dc) { body(bda, dc); };
};
};
extern struct btm_sec_conn_req btm_sec_conn_req;
extern struct btm_sec_conn_req btm_sec_conn_req;