mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-22 20:35:57 +08:00
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.
This commit is contained in:
parent
b9ab5a45ff
commit
035c0bc524
@ -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 ?
|
||||
|
Loading…
Reference in New Issue
Block a user