return false;
}
-/** Update the the last primary info for the service list info */
-static void gatt_update_last_pri_srv_info() {
- gatt_cb.last_primary_s_handle = 0;
+/** Update the the last service info for the service list info */
+static void gatt_update_last_srv_info() {
+ gatt_cb.last_service_handle = 0;
- for (tGATT_SRV_LIST_ELEM& el : *gatt_cb.srv_list_info)
- if (el.is_primary) gatt_cb.last_primary_s_handle = el.s_hdl;
+ for (tGATT_SRV_LIST_ELEM& el : *gatt_cb.srv_list_info) {
+ gatt_cb.last_service_handle = el.s_hdl;
+ }
}
/*******************************************************************************
elem.sdp_handle = 0;
}
- gatt_update_last_pri_srv_info();
+ gatt_update_last_srv_info();
VLOG(1) << StringPrintf(
"%s: allocated el: s_hdl=%d e_hdl=%d type=0x%x sdp_hdl=0x%x", __func__,
}
gatt_cb.srv_list_info->erase(it);
- gatt_update_last_pri_srv_info();
+ gatt_update_last_srv_info();
}
/*******************************************************************************
*
fixed_queue_t* sign_op_queue;
uint16_t next_handle; /* next available handle */
- uint16_t last_primary_s_handle; /* handle of last primary service */
+ uint16_t last_service_handle; /* handle of last service */
tGATT_SVC_CHG gattp_attr; /* GATT profile attribute service change */
tGATT_IF gatt_if;
std::list<tGATT_HDL_LIST_ELEM>* hdl_list_info;
UINT16_TO_STREAM(p, el.s_hdl);
- if (gatt_cb.last_primary_s_handle &&
- gatt_cb.last_primary_s_handle == el.s_hdl) {
+ if (gatt_cb.last_service_handle &&
+ gatt_cb.last_service_handle == el.s_hdl) {
VLOG(1) << "Use 0xFFFF for the last primary attribute";
/* see GATT ERRATA 4065, 4063, ATT ERRATA 4062 */
UINT16_TO_STREAM(p, 0xFFFF);