diff options
author | Lubomir I. Ivanov (VMware) <neolit123@gmail.com> | 2018-02-27 21:23:05 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-02-28 13:36:16 +0000 |
commit | ec54c731ad96df1b024fa4467a1f000672e5b7a6 (patch) | |
tree | 79c94a098df3dff4a799796c038f581ea3145e9a /src/bluetooth/qbluetoothserver_winrt.cpp | |
parent | 6b3cfe2f836556c2d92b6c7915232fa00fd040f6 (diff) |
qlecontroller_win: use lastIndexOf() in getDeviceAddress()
getDeviceAddress() does not work for all path cases, thus
instead of using:
firstbound = servicePath.indexOf(...)
use:
firstbound = servicePath.lastIndexOf(...)
Example path that breaks the current code:
"\\\\?\\bthledevice#{00001800-0000-1000-8000-00805f9b34fb}_dev_vid&01008f_pid&b00d_rev&0100_00802534ce0e#8&5481851&5&0001#{00001800-0000-1000-8000-00805f9b34fb}"
The current code works with paths of this format:
"\\\\?\\BTHLEDevice#{00001800-0000-1000-8000-00805f9b34fb}_7c669d8a6d7a#8&35290589&1&0001#{00001800-0000-1000-8000-00805f9b34fb}"
Notice that there are more than one "_" in the path that breaks.
Change-Id: I5f081b78d8f5bc5693ba05c8e73d4dcf0b42b6b2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothserver_winrt.cpp')
0 files changed, 0 insertions, 0 deletions