aboutsummaryrefslogtreecommitdiff
path: root/LinuxBluetooth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'LinuxBluetooth.cpp')
-rw-r--r--LinuxBluetooth.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/LinuxBluetooth.cpp b/LinuxBluetooth.cpp
index 2c0bffa..b886dde 100644
--- a/LinuxBluetooth.cpp
+++ b/LinuxBluetooth.cpp
@@ -1,9 +1,6 @@
#include "Bluetooth.h"
#include <string.h>
-#include <stropts.h>
-#include <sys/select.h>
-#include <unistd.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
@@ -170,7 +167,7 @@ void LinuxBluetoothDevice::discoverServices() {
throw BluetoothException(this, "read(): " + errnoAsString());
}
- ByteBuffer in = ByteBuffer(buffer, r);
+ ByteBuffer in = ByteBuffer(buffer, (size_t) r);
D << "read: " << r << " bytes: " << in.toString();
@@ -179,7 +176,9 @@ void LinuxBluetoothDevice::discoverServices() {
D << "READ_BY_GROUP_TYPE response has " + to_string(values.size()) + " values";
for (auto &data: values) {
- D << "handle: " << data.handle << ", groupEndHandle: " << data.groupEndHandle << ", value: " << data.value.toString();
+ D << "handle: 0x" << setw(4) << setfill('0') << hex << data.handle <<
+ ", groupEndHandle: 0x" << hex << setw(4) << setfill('0') << data.groupEndHandle <<
+ ", value: " << data.value.toString();
}
}