From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v1 2/2] monitor/att: Fix printing data twice
Date: Fri, 30 Jan 2026 10:56:37 -0500 [thread overview]
Message-ID: <20260130155637.1150573-2-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20260130155637.1150573-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This fixes ATT Read Response printing the data read twice by checking if
there is a dedicated decoder then skip printing the value since it is
latter printed by att_read_func:
== Before ==
> ACL Data RX: Handle 2048 flags 0x02 dlen 7
ATT: Read Response (0x0b) len 2
Value[2]:
11 01
Handle: 0x0030 Type: Report Reference (0x2908)
Value Handle: 0x002e Type: Report (0x2a4d)
Value[2]:
11 01
== After ==
> ACL Data RX: Handle 2048 flags 0x02 dlen 7
ATT: Read Response (0x0b) len 2
Handle: 0x0030 Type: Report Reference (0x2908)
Value Handle: 0x002e Type: Report (0x2a4d)
Value[2]:
11 01
---
monitor/att.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/monitor/att.c b/monitor/att.c
index b77ffb66e89d..e76cb44d28f5 100644
--- a/monitor/att.c
+++ b/monitor/att.c
@@ -4989,11 +4989,11 @@ static void att_read_rsp(const struct l2cap_frame *frame)
{
struct att_read *read;
- print_hex_field("Value", frame->data, frame->size);
-
read = att_get_read(frame);
- if (!read)
+ if (!read) {
+ print_hex_field("Value", frame->data, frame->size);
return;
+ }
/* Check if the data size is equal to the MTU then read long procedure
* maybe used.
--
2.52.0
next prev parent reply other threads:[~2026-01-30 15:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 15:56 [PATCH BlueZ v1 1/2] monitor/att: Add initial decoding for HIDS attributes Luiz Augusto von Dentz
2026-01-30 15:56 ` Luiz Augusto von Dentz [this message]
2026-01-30 17:09 ` [BlueZ,v1,1/2] " bluez.test.bot
2026-02-02 16:40 ` [PATCH BlueZ v1 1/2] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260130155637.1150573-2-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox