diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-08-29 17:07:58 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-09-02 13:57:43 +0200 |
commit | 0f6f27d2dd54f487e790959747c7c1e765e84637 (patch) | |
tree | 676ab4828f45d448c5e79b36479727591df9b94f /src/bluetooth/qbluetoothsocket_bluez.cpp | |
parent | 8146a18be0c98751816ffe40661308081a57573d (diff) |
Fix failing L2CP socket's on high-endian systems
Bluetooth byte order is little endian. htbos ensures the psm is
converted to the required byte order.
Change-Id: I22362d1f1fe3978df7855eab14154644a1d60a0d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_bluez.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothsocket_bluez.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth/qbluetoothsocket_bluez.cpp b/src/bluetooth/qbluetoothsocket_bluez.cpp index 3be1125b..e7bf4536 100644 --- a/src/bluetooth/qbluetoothsocket_bluez.cpp +++ b/src/bluetooth/qbluetoothsocket_bluez.cpp @@ -162,10 +162,10 @@ void QBluetoothSocketPrivate::connectToService(const QBluetoothAddress &address, addr.l2_cid = htobs(port); addr.l2_bdaddr_type = BDADDR_LE_PUBLIC; } else { - addr.l2_psm = port; + addr.l2_psm = htobs(port); } #else - addr.l2_psm = port; + addr.l2_psm = htobs(port); #endif convertAddress(address.toUInt64(), addr.l2_bdaddr.b); |