summaryrefslogtreecommitdiff
path: root/monitor/att.c
diff options
context:
space:
mode:
authorSimon Mikuda <simon.mikuda@streamunlimited.com>2023-03-23 11:28:58 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-03-23 13:48:08 -0700
commit648b4362521bcd9146b88d03e51e05454269e27f (patch)
tree33213c1c50ac74ac7d49aa1dcb457f11dd296617 /monitor/att.c
parent446e13360dbaa95fd3912ebb9ca734ccb17d7a32 (diff)
downloadbluez-648b4362521bcd9146b88d03e51e05454269e27f.tar.gz
monitor: Fix printing Signed Write Command
Data field were print twice (1 time incorrectly): > ACL Data RX: Handle 64 flags 0x02 dlen 19 ATT: Signed Write Command (0xd2) len 14 Handle: 0x006f Type: Vendor specific (f7debc9a-7856-3412-7856-341278563412) Data: 0800000087f303c224516133 Data: Signature: 0800000087f303c224516133
Diffstat (limited to 'monitor/att.c')
-rw-r--r--monitor/att.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/monitor/att.c b/monitor/att.c
index d3b82074f..18a5af05b 100644
--- a/monitor/att.c
+++ b/monitor/att.c
@@ -2934,13 +2934,14 @@ static void print_write(const struct l2cap_frame *frame, uint16_t handle,
struct gatt_handler *handler;
print_handle(frame, handle, false);
- print_hex_field(" Data", frame->data, frame->size);
if (len > frame->size) {
print_text(COLOR_ERROR, "invalid size");
return;
}
+ print_hex_field(" Data", frame->data, len);
+
attr = get_attribute(frame, handle, false);
if (!attr)
return;
@@ -3105,7 +3106,6 @@ static void att_signed_write_command(const struct l2cap_frame *frame)
}
print_write(frame, handle, frame->size - 12);
- print_hex_field(" Data", frame->data, frame->size - 12);
print_hex_field(" Signature", frame->data + frame->size - 12, 12);
}