diff options
author | Santiago Carot-Nemesio <sancane@gmail.com> | 2011-11-30 17:36:16 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-01-17 11:41:52 +0100 |
commit | 4222c68155771e58c8567cc7db00e1937e9a4013 (patch) | |
tree | 26e8c35d61b7d34de0e686680240f3d4a4deff56 /btio | |
parent | 0a29072527e6265e94ae5dc0c67c635c485037de (diff) | |
download | ofono-4222c68155771e58c8567cc7db00e1937e9a4013.tar.bz2 |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/btio/btio.c b/btio/btio.c index a129bf98..f8c5cc70 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 ? |