diff --git a/android/gatt.c b/android/gatt.c
index 4f0a656..d7228a3 100644
--- a/android/gatt.c
+++ b/android/gatt.c
struct service {
struct element_id id;
- struct gatt_primary primary;
+ struct gatt_primary prim;
struct queue *chars;
};
}
/* Put primary service to our local list */
- memcpy(&p->primary, prim, sizeof(p->primary));
+ memcpy(&p->prim, prim, sizeof(p->prim));
if (!queue_push_tail(dev->services, p)) {
error("gatt: Cannot push primary service to the list");
free(p);
const bt_uuid_t *uuid = user_data;
bt_uuid_t service_uuid;
- if (bt_string_to_uuid(&service_uuid, service->primary.uuid) < 0)
+ if (bt_string_to_uuid(&service_uuid, service->prim.uuid) < 0)
return false;
return !bt_uuid_cmp(uuid, &service_uuid);
return;
}
- bt_string_to_uuid(&uuid, service->primary.uuid);
+ bt_string_to_uuid(&uuid, service->prim.uuid);
/* TODO store included services in device->services list */
for (; included; included = included->next) {
data->service = service;
data->device = device;
- gatt_find_included(device->attrib, service->primary.range.start,
- service->primary.range.end, get_included_cb,
+ gatt_find_included(device->attrib, service->prim.range.start,
+ service->prim.range.end, get_included_cb,
data);
status = HAL_STATUS_SUCCESS;
cb_data->service = srvc;
cb_data->conn_id = dev->conn_id;
- if (!gatt_discover_char(dev->attrib, srvc->primary.range.start,
- srvc->primary.range.end, NULL,
+ if (!gatt_discover_char(dev->attrib, srvc->prim.range.start,
+ srvc->prim.range.end, NULL,
discover_char_cb, cb_data)) {
free(cb_data);
/* Clip range to given characteristic */
start = ch->ch.value_handle + 1;
- end = srvc->primary.range.end;
+ end = srvc->prim.range.end;
/* Use next characteristic start as end. If there is none -
* service end is valid end.