diff options
author | Santiago Carot-Nemesio <sancane@gmail.com> | 2011-12-05 12:54:45 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-01-17 11:45:44 +0100 |
commit | 1b8c00bb9d175423cdd18ad9fcb1eb6bdf7d376e (patch) | |
tree | 03a6b9f2c14a07d922a10925f6995413eb357e2d | |
parent | 31c23456a6e5afcdeefbe51b2860b4494ffff842 (diff) | |
download | obexd-1b8c00bb9d175423cdd18ad9fcb1eb6bdf7d376e.tar.gz |
btio: Fix byte order conversion when getting L2CAP CID
The L2CAP CID is passed and received in little endian byte order
through the socket interface so a conversion is in place before
passing it onwards.
-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 f8c5cc7..0d177a3 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -886,7 +886,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1, break; case BT_IO_OPT_CID: *(va_arg(args, uint16_t *)) = src.l2_cid ? - src.l2_cid : dst.l2_cid; + btohs(src.l2_cid) : btohs(dst.l2_cid); break; case BT_IO_OPT_OMTU: *(va_arg(args, uint16_t *)) = l2o.omtu; |