summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gatt-example.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/gatt-example.c b/plugins/gatt-example.c
index 701c1d7e3..e791c5391 100644
--- a/plugins/gatt-example.c
+++ b/plugins/gatt-example.c
@@ -105,8 +105,11 @@ static uint8_t battery_state_read(struct attribute *a, gpointer user_data)
static gboolean register_battery_service(struct btd_adapter *adapter)
{
- return gatt_service_add(adapter, GATT_PRIM_SVC_UUID,
- BATTERY_STATE_SVC_UUID,
+ bt_uuid_t uuid;
+
+ bt_uuid16_create(&uuid, BATTERY_STATE_SVC_UUID);
+
+ return gatt_service_add(adapter, GATT_PRIM_SVC_UUID, &uuid,
/* battery state characteristic */
GATT_OPT_CHR_UUID, BATTERY_STATE_UUID,
GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_READ |