summaryrefslogtreecommitdiff
path: root/btio
diff options
context:
space:
mode:
authorSantiago Carot-Nemesio <sancane@gmail.com>2011-11-30 17:36:16 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2011-11-30 23:25:31 +0200
commit035c0bc5241164640905e1cee52eafc1b7078896 (patch)
tree6113c339320b362ce3ee590bac387ce2176d3661 /btio
parentb9ab5a45fffa6131d4514d7ccda1cfe8fa9015f6 (diff)
downloadbluez-035c0bc5241164640905e1cee52eafc1b7078896.tar.gz
btio: Fix byte order conversion when getting L2CAP PSM
The L2CAP PSM is passed and received in little endian byte order through the socket interface so a conversion is in place before passing it onwards.
Diffstat (limited to 'btio')
-rw-r--r--btio/btio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btio/btio.c b/btio/btio.c
index a129bf983..f8c5cc70d 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 ?