|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
L2CP's psm (the RFCOMM port equivalent) was never published via SDP.
Therefore the service client could not get the required information
to connect to the server. After this patch Qt properly publishes
the psm.
Also, QBluetoothSocket::connect() initiated a service
discovery to obtain the missing psm. Since the published SDP
entry didn't contain one, protocolServiceMultiplexer() always returned
0 and another service discovery was initiated. This caused a crash
inside QBluetoothSocket because the 1st QBluetoothServiceDiscoveryAgent
instance was deleted in favor of the 2nd.
The patch changes the client behavior such that it doesn't crash
if the service discovery didn't turn up a valid psm/port.
It improves the robustness in case of an error and avoids
a second service discovery (which wouldn't turn up more information
anyway).
The bug only affected Bluez as it is the only platform supporting
pure L2CP sockets.
Last but not least a capability to test L2CP sockets was added to
bttestui.
Change-Id: I46c88a67c2baa4782ea908e645dcd4db9422dbba
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|