summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-281-1/+3
|\ | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp Change-Id: Ie8bf1903f9c7c1ccd5b05a3f97049ae0882b88b8
| * Fix L2CP socket connectionsv5.3.2Alex Blasche2014-08-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Update license headers and add new licensesJani Heikkinen2014-08-241-18/+10
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I7a8b8b787fcae9a178794364efdefe1021d10b1b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Reduce system header dependenciesAlex Blasche2014-07-161-1/+1
| | | | | Change-Id: I52ac33b4864d6bfca248ff3fad5a069154a9c756 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Android: Fix crash in QBluetoothServer::close()Alex Blasche2014-02-271-1/+1
| | | | | | | | | | | | | | Java's BluetoothSocketServer.accept() is meant to be interrupted via BluetoothSocketServer.close(). Unfortunately if the surrounding thread is a QThread the returning accept call crashes the thread. This does not happen if it is a Java Thread. This commit changes the server's private backend to a Java thread. Task-number: QTBUG-36754 Change-Id: I5aacc5444bbcd1275a11743b6aa04d2b11a5b22b Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Max pending connection check for QNX server implementedNedim Hadzic2014-02-261-0/+2
| | | | | | | | Max pending connections was ignored when adding new connections. Change-Id: I96b1ae87254a772008b18a662faa7bc2bd84164b Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge remote-tracking branch 'gerrit/stable' into devAlex Blasche2014-02-141-2/+1
|\ | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothserver.cpp src/bluetooth/qbluetoothserver.h Change-Id: Ia99c341ab6b4fb30d9ceb9e4516c7083eed1c547
| * Fix interaction with Android devicesAlex Blasche2014-02-131-1/+3
| | | | | | | | | | | | | | | | The custom uuid of a Serial port profile must be part of the service class property. This enables Android to find the custom uuid. Change-Id: Ibe0bfcfe6ba7fa6b72a979153afccf17d6b4eb83 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Port QtBluetooth to AndroidAlex Blasche2014-02-131-4/+22
|/ | | | | | | | | | | | | | | | | | | | | | This is a feature merge to dev targeting Qt 5.3. Known issues: -QTBUG-36754: QBluetoothServer::close() crashes -QTBUG-36763: QBluetothTransferManager port to Android not possible -QTBUG-36764: Improve QBluetoothLocalDevice::connectedDevices() -QTBUG-36810: Remove direct use of Android action strings The above issues and some other minor TODO's will be addressed until final release time. Task-number: QTBUG-33792 [ChangeLog][QtBluetooth][Android] QtBluetooth has been ported to Android. Change-Id: I31ba83e3b7d6aa68e7258b7e43235de7d1a6e68a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QBluetoothServer fixesAlex Blasche2014-02-071-4/+14
| | | | | | | | | | | | | | | | | | | 1.) If QBluetoothServer::listen(QBluetoothUuid,QString) fails during service registration we have to ensure that the Server doesn't remain in listening state. 2.) 29de876f55dc96748fdca8dd3fef0c873791796f sets the socket descriptor to -1 when closing the QBluetoothSocket. QBluetothServer treats a value of -1 as error and aborts any call to listen(). This implies that any call to listen() after the first close() would always fail. This patch adds some redundancy and first tries to recreate the socket and only if the re-creation failed exists with an error. 3.) Catch case when user calls listen() on an already listening server. Documentation has been updated to document the behavior. Change-Id: I2df13500e74a9741017f7404f0e0c477c96d5356 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Fixing small QBluetoothServer issuesAlex Blasche2013-09-251-1/+2
| | | | | | | | | | -extending documentation -emit error signal when setting a new error Task-number: QTBUG-32669 Change-Id: I16b8a149792ed5068a7bd76af874477084802aea Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Error handling for QBluetoothServerFabian Bumberger2013-09-201-0/+32
| | | | | | Task-number: QTBUG-32669 Change-Id: I0f12b19f7989972b7c8305f6e11a95f7f25a281d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Unify QBluetoothSoket, QBluetoothServer and QBluetoothServiceInfo protocol enumFabian Bumberger2013-09-201-15/+6
| | | | | Change-Id: I6e66196a599e2cceabc7d93d728ba97361d8999f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QNX: Take socketType and serverType into accountFabian Bumberger2013-09-191-0/+11
| | | | | | | Also add a serverType member function in QBluetoothServer Change-Id: I107f73b3943dc84f5c4d2afcb00e303567a67b5d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* BlackBerry: Add some platform documentationFabian Bumberger2013-09-181-2/+5
| | | | | Change-Id: If2a8d289578f3bc7622cedd9faf35893880a2157 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove QtBluetooth and QtNfc namespace.Alex Blasche2013-09-091-2/+2
| | | | | | | | This is based on namespace discussions on the Qt project dev mailing list. We continue to use the Qt namespace. Change-Id: I6119d06662f7682c11f42d759f3218be1f5a7d6c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix Doc warning in QtBluetoothAlex Blasche2013-09-051-1/+1
| | | | | | Change-Id: I24783920a815ee69eb28f0f37ab4c47af730826c Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge QRfcommServer and QL2capServer to QBluetoothServerFabian Bumberger2013-08-291-0/+253
Task-number: QTBUG-32722 Change-Id: Ia75ad5af2f81b737a8cca09dba919a7dc0fa0f8a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>