[PATCH BlueZ 1/2] monitor/avctp: Fix parsing of GetElementAttribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

AVRCP byte order is always big endian:

Audio/Video Remote Control / Profile Specification - Page 20:

 'Transfer Octet Order; Packets shall transfer multiple-octet fields in
 standard network octet order (Big Endian), with more significant
 (high-order) octets being transferred before less-significant (low-order)
 octets.'
---
 monitor/avctp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/avctp.c b/monitor/avctp.c
index dc03195a8..fb2628282 100644
--- a/monitor/avctp.c
+++ b/monitor/avctp.c
@@ -1192,7 +1192,7 @@ static bool avrcp_get_element_attributes(struct avctp_frame *avctp_frame,
 	for (; num > 0; num--) {
 		uint32_t attr;
 
-		if (!l2cap_frame_get_le32(frame, &attr))
+		if (!l2cap_frame_get_be32(frame, &attr))
 			return false;
 
 		print_field("%*cAttributeID: 0x%08x (%s)", (indent - 8),
-- 
2.33.1




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux