summaryrefslogtreecommitdiff
path: root/monitor/avctp.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-01-21 17:33:06 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-01-27 12:38:33 +0200
commit23d0af616b2dfb59f0145838a00811eab8e38a48 (patch)
treeb0b43b1d74a9424e0f747957bf6e99c4c6ef00cf /monitor/avctp.c
parent70fdb77d0af137aa859f267da976f610cd9bbbd2 (diff)
downloadbluez-23d0af616b2dfb59f0145838a00811eab8e38a48.tar.gz
monitor/avctp: Print <empty> 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: <empty>
Diffstat (limited to 'monitor/avctp.c')
-rw-r--r--monitor/avctp.c7
1 files changed, 6 insertions, 1 deletions
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: <empty>", indent, ' ');
+ continue;
+ }
+
+ printf("%*cFolder: ", indent+8, ' ');
for (; len > 0; len--) {
uint8_t c;