summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-09-29 16:51:43 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-09-30 15:27:31 +0200
commit0564f806ee4eaeb10743ab21e30c783436e36d49 (patch)
treed822a772f8ddf12c58cc7ee50928f9329120192e
parent22042412de27c2fedec852051fe7fffcaf431a2e (diff)
Android: Fix broken QBluetoothServer::isListening
The function didn't return true right after calling listen(). This is caused by the fakeserverport implementation. On Android listen() doesn't really initiate the listen until QBluetoothServiceInfo::registerService() was called. We need to check the fakeServerPort registration to check whether we are listening already. [ChangeLog][QtBluetooth][Android] Fixed broken QBluetoothServer::isListening(). It returned false right after a successful call to listen(). Change-Id: I24de02602b401ecbbedaafd19d824170a181e03f Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r--src/bluetooth/qbluetoothserver_android.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothserver_android.cpp b/src/bluetooth/qbluetoothserver_android.cpp
index e1a50703..3660cff8 100644
--- a/src/bluetooth/qbluetoothserver_android.cpp
+++ b/src/bluetooth/qbluetoothserver_android.cpp
@@ -102,7 +102,7 @@ bool QBluetoothServerPrivate::deactivateActiveListening()
bool QBluetoothServerPrivate::isListening() const
{
- return thread->isRunning();
+ return __fakeServerPorts.contains(const_cast<QBluetoothServerPrivate *>(this));
}
void QBluetoothServer::close()