From f9cd4a1871ff0765cc5c03a2c21f9d2f7d9262c7 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 21 Jan 2016 17:33:06 +0200 Subject: monitor/avctp: Print if folder lenght is 0 This is a bit more clear that is was not a parsing error but just that there is nothing to print: > ACL Data RX: Handle 256 flags 0x02 dlen 39 Channel: 68 len 35 ctrl 0x0304 [PSM 27 mode 3] {chan 4} I-frame: Unsegmented TxSeq 2 ReqSeq 3 AVCTP Browsing: Response: type 0x00 label 2 PID 0x110e AVRCP: SetBrowsedPlayer: len 0x0019 Status: 0x04 (Success) UIDCounter: 0x0000 (0) Number of Items: 0x00000002 (2) CharsetID: 0x006a (UTF-8) Folder Depth: 0x01 (1) Folder: --- monitor/avctp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/monitor/avctp.c b/monitor/avctp.c index a024a0fcd..81e91668e 100644 --- a/monitor/avctp.c +++ b/monitor/avctp.c @@ -2430,7 +2430,12 @@ response: if (!l2cap_frame_get_u8(frame, &len)) return false; - printf("Folder: "); + if (!len) { + print_field("%*cFolder: ", indent, ' '); + continue; + } + + printf("%*cFolder: ", indent+8, ' '); for (; len > 0; len--) { uint8_t c; -- cgit v1.2.1