Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Fix byte order problems getting PSM through btio API
@ 2011-11-30 16:36 Santiago Carot-Nemesio
  2011-11-30 16:44 ` Santiago Carot
  0 siblings, 1 reply; 5+ messages in thread
From: Santiago Carot-Nemesio @ 2011-11-30 16:36 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Santiago Carot-Nemesio

---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-01 20:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-30 16:36 [PATCH] Fix byte order problems getting PSM through btio API Santiago Carot-Nemesio
2011-11-30 16:44 ` Santiago Carot
2011-11-30 21:16   ` Johan Hedberg
2011-12-01 19:31     ` Santiago Carot
2011-12-01 20:34       ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox