diff options
author | Gowtham Anandha Babu <gowtham.ab@samsung.com> | 2014-12-05 19:14:29 +0530 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-12-05 17:13:34 +0200 |
commit | 804d14559e733a9bdd09a33a5e5d33602d589cfc (patch) | |
tree | 476342bb2878cacd926e7939b977ef8caadca07c /monitor/rfcomm.c | |
parent | ca63449aafbc65bcdee8ed8e1ea8af727808eb3b (diff) | |
download | bluez-804d14559e733a9bdd09a33a5e5d33602d589cfc.tar.gz |
monitor/rfcomm: Fix byte ordering issue
The correct byte order for RFCOMM protocol is
little endian.
Diffstat (limited to 'monitor/rfcomm.c')
-rw-r--r-- | monitor/rfcomm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/monitor/rfcomm.c b/monitor/rfcomm.c index 4ba61c860..7d22fa033 100644 --- a/monitor/rfcomm.c +++ b/monitor/rfcomm.c @@ -218,7 +218,7 @@ static inline bool mcc_rpn(struct rfcomm_frame *rfcomm_frame, uint8_t indent) GET_RPN_RTCI(rpn.io), GET_RPN_RTCO(rpn.io), rpn.xon, rpn.xoff); - if (!l2cap_frame_get_be16(frame, &rpn.pm)) + if (!l2cap_frame_get_le16(frame, &rpn.pm)) return false; print_field("%*cpm 0x%04x", indent, ' ', rpn.pm); @@ -267,7 +267,7 @@ static inline bool mcc_pn(struct rfcomm_frame *rfcomm_frame, uint8_t indent) if (!l2cap_frame_get_u8(frame, &pn.ack_timer)) return false; - if (!l2cap_frame_get_be16(frame, &pn.mtu)) + if (!l2cap_frame_get_le16(frame, &pn.mtu)) return false; if (!l2cap_frame_get_u8(frame, &pn.max_retrans)) |