diff options
author | Christian Eggers <ceggers@arri.de> | 2022-09-23 16:33:31 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-05-02 10:29:32 -0400 |
commit | 14057f2cc0ea31b0f332e65dcfba2197b1e280f2 (patch) | |
tree | 7203cf2b7d381c9a11e2787f80325d2d198959ac | |
parent | f40c5857d70a91e417e22da9da20f4193414b8a3 (diff) |
client/gatt: gatt_register_app: fix parsing of UUIDs
- argv[0] (shell command) must not be used as UUID argument
- fixed linked list iteration
-rw-r--r-- | client/gatt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/gatt.c b/client/gatt.c index 84b7f3f49f..3aaa7a9361 100644 --- a/client/gatt.c +++ b/client/gatt.c @@ -1402,7 +1402,7 @@ static gboolean get_uuids(const GDBusPropertyTable *property, dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &entry); - for (uuid = uuids; uuid; uuid = g_list_next(uuid->next)) + for (uuid = uuids; uuid; uuid = g_list_next(uuid)) dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &uuid->data); @@ -1428,7 +1428,7 @@ void gatt_register_app(DBusConnection *conn, GDBusProxy *proxy, return bt_shell_noninteractive_quit(EXIT_FAILURE); } - for (i = 0; i < argc; i++) + for (i = 1; i < argc; i++) uuids = g_list_append(uuids, g_strdup(argv[i])); if (uuids) { |