client: Fix advertise.data command
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 20 Oct 2022 22:55:55 +0000 (15:55 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:55 +0000 (14:55 +0530)
advertise.data when no parameter is given shall print what is set on
ad.data not the ad.manufacturer which is a different field set by
advertise.manufacturer.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
client/advertising.c

index beb47d6..f849180 100644 (file)
@@ -759,7 +759,7 @@ void ad_advertise_data(DBusConnection *conn, int argc, char *argv[])
        struct ad_data data;
 
        if (argc < 2 || !strlen(argv[1])) {
-               if (ad.manufacturer.data.len) {
+               if (ad.data.data.len) {
                        bt_shell_printf("Type: 0x%02x\n", ad.data.type);
                        bt_shell_hexdump(ad.data.data.data, ad.data.data.len);
                }