diff options
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 4af9fe1..5063df6 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -274,21 +274,6 @@ void MainWindow::tellClientCurrentSituation(Client* client) } /***************************************************************************//** - * Checks if client and manager runs on same machine. - * @param client - * @return Return true, if pvsmanager is running on client. - */ -bool MainWindow::isManagerMachine(Client* client) -{ - foreach (const QHostAddress &address, QNetworkInterface::allAddresses()) - if (address != QHostAddress(QHostAddress::LocalHost) - && client != NULL - && client->ip() == address.toString()) - return true; - return false; -} - -/***************************************************************************//** * Returns connected client which belongs to given id. * Iterating over ConnectionFrames and comparing id to given id. * @param id @@ -719,9 +704,7 @@ void MainWindow::onButtonLock(bool checked) for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) { - // Check if client is Tutor or the manager is also running on this machine. - bool isManager = isManagerMachine((*it)->client()); - if ((*it)->client() == NULL || isManager) + if ((*it)->client() == NULL) continue; (*it)->client()->lockScreen(checked); } @@ -972,8 +955,7 @@ void MainWindow::onVncServerStateChange(Client* client) else { // Lock others and stop their clients - bool isManager = isManagerMachine((*it)->client()); - (*it)->client()->lockScreen(_mode == Mode::LockedMulticast && isManager != true); + (*it)->client()->lockScreen(_mode == Mode::LockedMulticast); (*it)->client()->stopVncClient(); } } |