monitor/att: Fix treating Notification/Indication as a request
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 20 May 2022 23:18:46 +0000 (16:18 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
Notification/Indication shall be treated as response so the correct
database is used.

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

index 61eaa9c..4b8bffb 100644 (file)
@@ -729,7 +729,7 @@ static void print_notify(const struct l2cap_frame *frame, uint16_t handle,
        struct gatt_db_attribute *attr;
        struct gatt_handler *handler;
 
-       print_handle(frame, handle, true);
+       print_handle(frame, handle, false);
        print_hex_field("  Data", frame->data, len);
 
        if (len > frame->size) {
@@ -737,7 +737,7 @@ static void print_notify(const struct l2cap_frame *frame, uint16_t handle,
                return;
        }
 
-       attr = get_attribute(frame, handle, true);
+       attr = get_attribute(frame, handle, false);
        if (!attr)
                return;