diff --git a/profiles/gatt/gas.c b/profiles/gatt/gas.c
index 28d7fbf..d189221 100644
--- a/profiles/gatt/gas.c
+++ b/profiles/gatt/gas.c
btd_device_gatt_set_service_changed(gas->device, start, end);
}
-static void gatt_service_changed_cb(guint8 status, const guint8 *pdu,
- guint16 plen, gpointer user_data)
-{
- struct gas *gas = user_data;
- uint16_t start, end;
-
- if (status) {
- error("Read GATT Service Changed failed: %s",
- att_ecode2str(status));
- return;
- }
-
- if (plen != 5) {
- error("Service Changed: PDU length mismatch");
- return;
- }
-
- start = att_get_u16(&pdu[1]);
- end = att_get_u16(&pdu[3]);
-
- if (gas->changed.start == start && gas->changed.end == end)
- return;
-
- gas->changed.start = start;
- gas->changed.end = end;
-
- DBG("GATT Service Changed start: 0x%04X end: 0x%04X", start, end);
-
- btd_device_gatt_set_service_changed(gas->device, start, end);
-}
-
static void gatt_descriptors_cb(guint8 status, const guint8 *pdu, guint16 len,
gpointer user_data)
{
/* TODO: Read other GAP characteristics - See Core spec page 1739 */
/*
- * Always read the characteristic value in the first connection
- * since attribute handles caching is not supported at the moment.
* When re-connecting <<Service Changed>> handle and characteristic
* value doesn't need to read again: known information from the
* previous interaction.
bt_uuid16_create(&uuid, GATT_CHARAC_SERVICE_CHANGED);
- gatt_read_char_by_uuid(gas->attrib, gas->gatt.start,
- gas->gatt.end, &uuid,
- gatt_service_changed_cb, gas);
-
gatt_discover_char(gas->attrib, gas->gatt.start, gas->gatt.end,
&uuid, gatt_characteristic_cb, gas);
}