diff options
author | Santiago Carot-Nemesio <sancane@gmail.com> | 2011-11-30 17:36:16 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2011-11-30 23:25:31 +0200 |
commit | 035c0bc5241164640905e1cee52eafc1b7078896 (patch) | |
tree | 6113c339320b362ce3ee590bac387ce2176d3661 /btio/btio.c | |
parent | b9ab5a45fffa6131d4514d7ccda1cfe8fa9015f6 (diff) | |
download | bluez-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/btio.c')
-rw-r--r-- | btio/btio.c | 2 |
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 ? |