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

Commit 014c832a authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Gerrit Code Review
Browse files

Merge "Fix GATT log spam"

parents b926597e 45c3106e
Loading
Loading
Loading
Loading
+18 −18
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ tGATT_STATUS GATTS_HandleValueIndication(uint16_t conn_id, uint16_t attr_handle,
  tGATT_REG* p_reg = gatt_get_regcb(gatt_if);
  tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx);

  LOG(INFO) << __func__;
  VLOG(1) << __func__;
  if ((p_reg == NULL) || (p_tcb == NULL)) {
    LOG(ERROR) << __func__ << ": Unknown  conn_id: " << +conn_id;
    return (tGATT_STATUS)GATT_INVALID_CONN_ID;
@@ -536,7 +536,7 @@ tGATT_STATUS GATTS_HandleValueNotification(uint16_t conn_id,
  tGATT_REG* p_reg = gatt_get_regcb(gatt_if);
  tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx);

  LOG(INFO) << __func__;
  VLOG(1) << __func__;

  if ((p_reg == NULL) || (p_tcb == NULL)) {
    LOG(ERROR) << __func__ << "Unknown  conn_id: " << conn_id;
@@ -584,7 +584,7 @@ tGATT_STATUS GATTS_SendRsp(uint16_t conn_id, uint32_t trans_id,
  tGATT_REG* p_reg = gatt_get_regcb(gatt_if);
  tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx);

  LOG(INFO) << __func__
  VLOG(1) << __func__
          << StringPrintf(": conn_id: %u  trans_id: %u  Status: 0x%04x",
                          conn_id, trans_id, status);

@@ -634,7 +634,7 @@ tGATT_STATUS GATTC_ConfigureMTU(uint16_t conn_id, uint16_t mtu) {
  tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx);
  tGATT_REG* p_reg = gatt_get_regcb(gatt_if);

  LOG(INFO) << __func__ << StringPrintf("conn_id=%d mtu=%d", conn_id, mtu);
  VLOG(1) << __func__ << StringPrintf("conn_id=%d mtu=%d", conn_id, mtu);

  if ((p_tcb == NULL) || (p_reg == NULL) || (mtu < GATT_DEF_BLE_MTU_SIZE) ||
      (mtu > GATT_MAX_MTU_SIZE)) {
@@ -738,7 +738,7 @@ tGATT_STATUS GATTC_Read(uint16_t conn_id, tGATT_READ_TYPE type,
  tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx);
  tGATT_REG* p_reg = gatt_get_regcb(gatt_if);

  LOG(INFO) << __func__ << StringPrintf(" conn_id=%d type=%d", conn_id, type);
  VLOG(1) << __func__ << StringPrintf(" conn_id=%d type=%d", conn_id, type);

  if ((p_tcb == NULL) || (p_reg == NULL) || (p_read == NULL) ||
      ((type >= GATT_READ_MAX) || (type == 0))) {
@@ -870,7 +870,7 @@ tGATT_STATUS GATTC_ExecuteWrite(uint16_t conn_id, bool is_execute) {
  tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx);
  tGATT_REG* p_reg = gatt_get_regcb(gatt_if);

  LOG(INFO) << __func__
  VLOG(1) << __func__
          << StringPrintf(": conn_id=%d is_execute=%d", conn_id, is_execute);

  if ((p_tcb == NULL) || (p_reg == NULL)) {
@@ -907,7 +907,7 @@ tGATT_STATUS GATTC_ExecuteWrite(uint16_t conn_id, bool is_execute) {
 *
 ******************************************************************************/
tGATT_STATUS GATTC_SendHandleValueConfirm(uint16_t conn_id, uint16_t handle) {
  LOG(INFO) << __func__
  VLOG(1) << __func__
          << StringPrintf(" conn_id=%d handle=0x%x", conn_id, handle);

  tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(GATT_GET_TCB_IDX(conn_id));
@@ -971,7 +971,7 @@ void GATT_SetIdleTimeout(const RawAddress& bd_addr, uint16_t idle_tout,
    }
  }

  LOG(INFO) << __func__
  VLOG(1) << __func__
          << StringPrintf(" idle_tout=%d status=%d(1-OK 0-not performed)",
                          idle_tout, status);
}
@@ -1040,7 +1040,7 @@ tGATT_IF GATT_Register(tBT_UUID* p_app_uuid128, tGATT_CBACK* p_cb_info) {
 *
 ******************************************************************************/
void GATT_Deregister(tGATT_IF gatt_if) {
  LOG(INFO) << __func__ << " gatt_if=" << +gatt_if;
  VLOG(1) << __func__ << " gatt_if=" << +gatt_if;

  tGATT_REG* p_reg = gatt_get_regcb(gatt_if);
  /* Index 0 is GAP and is never deregistered */
@@ -1112,7 +1112,7 @@ void GATT_StartIf(tGATT_IF gatt_if) {
  uint16_t conn_id;
  tGATT_TRANSPORT transport;

  LOG(INFO) << __func__ << " gatt_if=" << gatt_if;
  VLOG(1) << __func__ << " gatt_if=" << gatt_if;
  p_reg = gatt_get_regcb(gatt_if);
  if (p_reg != NULL) {
    start_idx = 0;
@@ -1293,7 +1293,7 @@ bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if,
  tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx);
  bool status = false;

  LOG(INFO) << __func__ << " conn_id=" << +conn_id;
  VLOG(1) << __func__ << " conn_id=" << +conn_id;

  if (p_tcb && p_reg) {
    bd_addr = p_tcb->peer_bda;
@@ -1330,6 +1330,6 @@ bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, const RawAddress& bd_addr,
    status = true;
  }

  LOG(INFO) << __func__ << " status= " << +status;
  VLOG(1) << __func__ << " status= " << +status;
  return status;
}