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

Commit aa42a89b authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Add stack/gatt/gatt_int::kGattConnected/Disconnected am: 81de83c5

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1540561

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iec19de69410cb2802519873addf91114875565bb
parents d1ef7020 81de83c5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -100,6 +100,9 @@ typedef uint8_t tGATT_SEC_FLAG;
#define GATT_INFO_TYPE_PAIR_16 0x01
#define GATT_INFO_TYPE_PAIR_128 0x02

constexpr bool kGattConnected = true;
constexpr bool kGattDisconnected = !kGattConnected;

/*  GATT client FIND_TYPE_VALUE_Request data */
typedef struct {
  bluetooth::Uuid uuid; /* type of attribute to be found */
+2 −4
Original line number Diff line number Diff line
@@ -1573,10 +1573,8 @@ void gatt_cleanup_upon_disc(const RawAddress& bda, uint16_t reason,
    tGATT_REG* p_reg = &gatt_cb.cl_rcb[i];
    if (p_reg->in_use && p_reg->app_cb.p_conn_cb) {
      uint16_t conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
      VLOG(1) << StringPrintf("found p_reg tcb_idx=%d gatt_if=%d  conn_id=0x%x",
                              p_tcb->tcb_idx, p_reg->gatt_if, conn_id);
      (*p_reg->app_cb.p_conn_cb)(p_reg->gatt_if, bda, conn_id, false, reason,
                                 transport);
      (*p_reg->app_cb.p_conn_cb)(p_reg->gatt_if, bda, conn_id,
                                 kGattDisconnected, reason, transport);
    }
  }