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.
This commit is contained in:
Santiago Carot-Nemesio 2011-12-05 12:54:45 +01:00 committed by Marcel Holtmann
parent 4222c68155
commit b2ed1b1ac4
1 changed files with 1 additions and 1 deletions

View File

@ -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;