summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-07-01 12:58:25 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-07-02 13:21:54 +0200
commitb2cebb6530fecedfa1facd8e7ff7020a4147b803 (patch)
tree49d88d3993a281cf76d6a744d404a107d6938cac
parent094be0786f75ed33564c6096778510dab4500eb8 (diff)
Add ability to abort server sockets via bttestui
This equalizes the behavior of the Close and Abort button. Abort will disconnect the local client socket as well as all sockets which were established via the listening server socket. Change-Id: I68d3d7190641aab44612fa3fc00b38fdc31799a3 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
-rw-r--r--tests/bttestui/btlocaldevice.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp
index 251b6dfc..f08a175c 100644
--- a/tests/bttestui/btlocaldevice.cpp
+++ b/tests/bttestui/btlocaldevice.cpp
@@ -391,6 +391,12 @@ void BtLocalDevice::abortSocket()
qDebug() << "###### Disconnecting socket";
socket->abort();
}
+
+ if (!serverSockets.isEmpty()) {
+ qDebug() << "###### Closing server sockets";
+ foreach (QBluetoothSocket *s, serverSockets)
+ s->abort();
+ }
}
void BtLocalDevice::socketConnected()