diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2017-02-02 09:15:45 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2017-02-03 09:55:42 +0000 |
commit | 69c8d41f90cc9d0c77a512615896b8c5b9eec83f (patch) | |
tree | 3efa6f841be49307ed3350a5f4d38321af418ff9 /src | |
parent | f128dd43319d6a7020f7ee1e018b8f0bbff499ab (diff) |
winrt: maxPendingConnections must be lower than currently pending connections
Change-Id: Ie14506c0ad648413019c511d4d39dc8bd43d7405
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth/qbluetoothserver_winrt.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothserver_winrt.cpp b/src/bluetooth/qbluetoothserver_winrt.cpp index effe4dc9..28ab7e53 100644 --- a/src/bluetooth/qbluetoothserver_winrt.cpp +++ b/src/bluetooth/qbluetoothserver_winrt.cpp @@ -192,6 +192,12 @@ void QBluetoothServer::setMaxPendingConnections(int numConnections) { Q_D(QBluetoothServer); QMutexLocker locker(&d->pendingConnectionsMutex); + if (d->pendingConnections.count() > numConnections) { + qCWarning(QT_BT_WINRT) << "There are currently more than" << numConnections << "connections" + << "pending. Number of maximum pending connections was not changed."; + return; + } + d->maxPendingConnections = numConnections; } |