Thread (5 messages) read the whole thread 5 messages, 2 authors, 2011-12-01
STALE5357d

[PATCH] Fix byte order problems getting PSM through btio API

From: Santiago Carot-Nemesio <hidden>
Date: 2011-11-30 16:36:16
Subsystem: the rest · Maintainer: Linus Torvalds

---
 btio/btio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/btio/btio.c b/btio/btio.c
index a129bf9..f8c5cc7 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -882,7 +882,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,
 			break;
 		case BT_IO_OPT_PSM:
 			*(va_arg(args, uint16_t *)) = src.l2_psm ?
-						src.l2_psm : dst.l2_psm;
+					btohs(src.l2_psm) : btohs(dst.l2_psm);
 			break;
 		case BT_IO_OPT_CID:
 			*(va_arg(args, uint16_t *)) = src.l2_cid ?
-- 
1.7.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help