summaryrefslogtreecommitdiff
path: root/monitor/avctp.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-12-09 16:19:47 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-12-09 16:23:04 +0200
commit1aea87bb34bde9a7545e65cd5a26273de2e3b0f8 (patch)
treea4220843bf67e614adbdcea98f4cab594e0b0a31 /monitor/avctp.c
parent3a354a71df55786eec4b8bd9828a7c1d43c01ed9 (diff)
downloadbluez-1aea87bb34bde9a7545e65cd5a26273de2e3b0f8.tar.gz
monitor/avctp: Fix printing variable length names/values
Print variable names/values in a single line.
Diffstat (limited to 'monitor/avctp.c')
-rw-r--r--monitor/avctp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/monitor/avctp.c b/monitor/avctp.c
index 81e91668e..7f337a8fd 100644
--- a/monitor/avctp.c
+++ b/monitor/avctp.c
@@ -1965,7 +1965,7 @@ static bool avrcp_folder_item(struct avctp_frame *avctp_frame,
print_field("%*cNameLength: 0x%04x (%u)", indent, ' ',
namelen, namelen);
- print_field("%*cName: ", indent, ' ');
+ printf("%*cName: ", indent+8, ' ');
for (; namelen > 0; namelen--) {
uint8_t c;
if (!l2cap_frame_get_u8(frame, &c))
@@ -1973,6 +1973,7 @@ static bool avrcp_folder_item(struct avctp_frame *avctp_frame,
printf("%1c", isprint(c) ? c : '.');
}
+ printf("\n");
return true;
}
@@ -2005,7 +2006,7 @@ static bool avrcp_attribute_entry_list(struct avctp_frame *avctp_frame,
print_field("%*cAttributeLength: 0x%02x (%u)", indent, ' ',
len, len);
- print_field("%*cAttributeValue: ", indent, ' ');
+ printf("%*cAttributeValue: ", indent+8, ' ');
for (; len > 0; len--) {
uint8_t c;
@@ -2014,6 +2015,7 @@ static bool avrcp_attribute_entry_list(struct avctp_frame *avctp_frame,
printf("%1c", isprint(c) ? c : '.');
}
+ printf("\n");
}
return true;
@@ -2051,7 +2053,7 @@ static bool avrcp_media_element_item(struct avctp_frame *avctp_frame,
print_field("%*cNameLength: 0x%04x (%u)", indent, ' ',
namelen, namelen);
- print_field("%*cName: ", indent, ' ');
+ printf("%*cName: ", indent+8, ' ');
for (; namelen > 0; namelen--) {
uint8_t c;
if (!l2cap_frame_get_u8(frame, &c))
@@ -2059,6 +2061,7 @@ static bool avrcp_media_element_item(struct avctp_frame *avctp_frame,
printf("%1c", isprint(c) ? c : '.');
}
+ printf("\n");
if (!l2cap_frame_get_u8(frame, &count))
return false;