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

Commit 0f26c677 authored by Chris Manton's avatar Chris Manton
Browse files

Re-log stack/gatt/gatt_cl::gatt_act_discovery

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I8b70fb3717a6f89b4d667158f3f3f8cc35a5ef16
parent 148efc5c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include "gatt_int.h"
#include "l2c_api.h"
#include "log/log.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"

#define GATT_WRITE_LONG_HDR_SIZE 5 /* 1 opcode + 2 handle + 2 offset */
@@ -84,7 +85,7 @@ void gatt_act_discovery(tGATT_CLCB* p_clcb) {
  uint8_t op_code = disc_type_to_att_opcode[p_clcb->op_subtype];

  if (p_clcb->s_handle > p_clcb->e_handle || p_clcb->s_handle == 0) {
    /* end of handle range */
    LOG_DEBUG("Completed GATT discovery of all handle ranges");
    gatt_end_operation(p_clcb, GATT_SUCCESS, NULL);
    return;
  }
@@ -125,6 +126,7 @@ void gatt_act_discovery(tGATT_CLCB* p_clcb) {

  tGATT_STATUS st = attp_send_cl_msg(*p_clcb->p_tcb, p_clcb, op_code, &cl_req);
  if (st != GATT_SUCCESS && st != GATT_CMD_STARTED) {
    LOG_WARN("Unable to send ATT message");
    gatt_end_operation(p_clcb, GATT_ERROR, NULL);
  }
}