From 7b0e377b0d78dc7fc7acd1ed4bc456be72a06017 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 16 Jan 2018 17:01:03 -0200 Subject: [PATCH] client: Fix register-{characteristic, descriptor} Flags parameter should be found in the third parameter not the second since bt_shell don't omit the command anymore. --- client/gatt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/gatt.c b/client/gatt.c index 4d51e053c..b83bea729 100644 --- a/client/gatt.c +++ b/client/gatt.c @@ -1675,7 +1675,7 @@ void gatt_register_chrc(DBusConnection *conn, GDBusProxy *proxy, chrc->service = service; chrc->uuid = g_strdup(argv[1]); chrc->path = g_strdup_printf("%s/chrc%p", service->path, chrc); - chrc->flags = g_strsplit(argv[1], ",", -1); + chrc->flags = g_strsplit(argv[2], ",", -1); if (g_dbus_register_interface(conn, chrc->path, CHRC_INTERFACE, chrc_methods, NULL, chrc_properties, @@ -1867,7 +1867,7 @@ void gatt_register_desc(DBusConnection *conn, GDBusProxy *proxy, desc->chrc = g_list_last(service->chrcs)->data; desc->uuid = g_strdup(argv[1]); desc->path = g_strdup_printf("%s/desc%p", desc->chrc->path, desc); - desc->flags = g_strsplit(argv[1], ",", -1); + desc->flags = g_strsplit(argv[2], ",", -1); if (g_dbus_register_interface(conn, desc->path, DESC_INTERFACE, desc_methods, NULL, desc_properties, -- 2.47.3