summaryrefslogtreecommitdiffstats
path: root/btio
diff options
context:
space:
mode:
authorSantiago Carot-Nemesio <sancane@gmail.com>2011-12-05 12:54:45 +0100
committerMarcel Holtmann <marcel@holtmann.org>2012-01-17 11:42:21 +0100
commitb2ed1b1ac486a049c42a5dc2ae48b255ce617baf (patch)
tree29c075f16dbb37b72e37b216c38936e6cd93755a /btio
parent4222c68155771e58c8567cc7db00e1937e9a4013 (diff)
downloadofono-b2ed1b1ac486a049c42a5dc2ae48b255ce617baf.tar.bz2
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.
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 f8c5cc70..0d177a3a 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;