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

Commit 7013f4c6 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Separate GATT white list from global GATT control block.

Bug: 112827989
Test: compilation, no functional changes
Change-Id: I456a18c6ce567991c4768afaaa3266085a9d30fb
parent 625e1ae1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "sdp_api.h"
#include "stack/gatt/gatt_utils_white_list.h"
#include "utl.h"

#if (GAP_INCLUDED == TRUE)
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include "hcimsgs.h"
#include "l2c_int.h"
#include "osi/include/osi.h"
#include "stack/gatt/gatt_utils_white_list.h"

#include "gatt_int.h"

+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include "gatt_api.h"
#include "gatt_int.h"
#include "l2c_api.h"
#include "stack/gatt/gatt_utils_white_list.h"

using bluetooth::Uuid;

+0 −10
Original line number Diff line number Diff line
@@ -331,11 +331,6 @@ typedef struct {
  uint32_t service_change;
} tGATT_SVC_CHG;

typedef struct {
  std::unordered_set<tGATT_IF> gatt_if;
  RawAddress remote_bda;
} tGATT_BG_CONN_DEV;

#define GATT_SVC_CHANGED_CONNECTING 1     /* wait for connection */
#define GATT_SVC_CHANGED_SERVICE 2        /* GATT service discovery */
#define GATT_SVC_CHANGED_CHARACTERISTIC 3 /* service change char discovery */
@@ -386,7 +381,6 @@ typedef struct {
  tGATT_APPL_INFO cb_info;

  tGATT_HDL_CFG hdl_cfg;
  std::list<tGATT_BG_CONN_DEV> bgconn_dev;
} tGATT_CB;

#define GATT_SIZE_OF_SRV_CHG_HNDL_RANGE 4
@@ -477,10 +471,6 @@ extern bool gatt_auto_connect_dev_add(tGATT_REG* p_reg,
                                      const RawAddress& bd_addr);
extern bool gatt_auto_connect_dev_remove(tGATT_REG* p_reg,
                                         const RawAddress& bd_addr);
extern bool gatt_is_bg_dev_for_app(tGATT_BG_CONN_DEV* p_dev, tGATT_IF gatt_if);
extern uint8_t gatt_clear_bg_dev_for_addr(const RawAddress& bd_addr);
extern tGATT_BG_CONN_DEV* gatt_find_bg_dev(const RawAddress& remote_bda);
extern void gatt_deregister_bgdev_list(tGATT_IF gatt_if);

/* server function */
extern std::list<tGATT_SRV_LIST_ELEM>::iterator gatt_sr_find_i_rcb_by_handle(
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include "btm_int.h"
#include "device/include/interop.h"
#include "gatt_int.h"
#include "gatt_utils_white_list.h"
#include "l2c_api.h"
#include "osi/include/osi.h"

@@ -101,6 +102,7 @@ void gatt_init(void) {
  VLOG(1) << __func__;

  gatt_cb = tGATT_CB();
  gatt_reset_bgdev_list(true);
  memset(&fixed_reg, 0, sizeof(tL2CAP_FIXED_CHNL_REG));

  gatt_cb.def_mtu_size = GATT_DEF_BLE_MTU_SIZE;
Loading