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

Commit 2b2daf7c authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

gatt: Remove confusing GATT_CL_MAX_LCB

This is not needed and was incorrectly used by the srvc_eng
implementation, which is gatt server and not gatt client.

Bug: 325438660
Flag: Exempt, no functional change.
Test: mmm packages/modules/Bluetooth
Test: Manual sanity tests with multiple devices
Change-Id: I47f62e7edd64383bdea7d94ec98f41ef80313f31
parent b6e2ac00
Loading
Loading
Loading
Loading
+0 −9
Original line number Original line Diff line number Diff line
@@ -1074,15 +1074,6 @@ tGATT_CLCB* gatt_clcb_alloc(uint16_t conn_id) {
  gatt_cb.clcb_queue.emplace_back(clcb);
  gatt_cb.clcb_queue.emplace_back(clcb);
  auto p_clcb = &(gatt_cb.clcb_queue.back());
  auto p_clcb = &(gatt_cb.clcb_queue.back());


  if (gatt_cb.clcb_queue.size() > GATT_CL_MAX_LCB) {
    /* GATT_CL_MAX_LCB is here from the historical reasons. We believe this
     * limitation is not needed. In addition, number of clcb should not be
     * bigger than that and also if it is bigger, we  believe it should not
     * cause the problem. This WARN is just to monitor number of CLCB and will
     * help in debugging in case we are wrong */
    log::warn("Number of CLCB: {} > {}", gatt_cb.clcb_queue.size(),
              GATT_CL_MAX_LCB);
  }
  return p_clcb;
  return p_clcb;
}
}


+0 −4
Original line number Original line Diff line number Diff line
@@ -313,10 +313,6 @@ inline std::string gatt_disconnection_reason_text(
*/
*/
#define GATT_INVALID_CONN_ID 0xFFFF
#define GATT_INVALID_CONN_ID 0xFFFF


#ifndef GATT_CL_MAX_LCB
#define GATT_CL_MAX_LCB 22
#endif

/* GATT notification caching timer, default to be three seconds
/* GATT notification caching timer, default to be three seconds
*/
*/
#ifndef GATTC_NOTIF_TIMEOUT
#ifndef GATTC_NOTIF_TIMEOUT
+1 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@
#include "srvc_api.h"
#include "srvc_api.h"
#include "types/raw_address.h"
#include "types/raw_address.h"


#define SRVC_MAX_APPS GATT_CL_MAX_LCB
#define SRVC_MAX_APPS GATT_MAX_APPS


#define SRVC_ID_NONE 0
#define SRVC_ID_NONE 0
#define SRVC_ID_DIS 1
#define SRVC_ID_DIS 1