summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2016-10-18 15:38:57 +0200
committerSimon Rettberg2016-10-18 15:38:57 +0200
commit03d263f56869bf1456bb356339f207e8f63fa43f (patch)
tree6d4691db1e6333e6bdf6f032ceabd5a53b6a4c6b /src/server/mainwindow/mainwindow.cpp
parentImprove manager switching scripts (diff)
downloadpvs2-03d263f56869bf1456bb356339f207e8f63fa43f.tar.gz
pvs2-03d263f56869bf1456bb356339f207e8f63fa43f.tar.xz
pvs2-03d263f56869bf1456bb356339f207e8f63fa43f.zip
[server] Remove pointless code relying on defunct tutor ip list
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index b54a190..4c10c60 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -1209,7 +1209,6 @@ void MainWindow::onClientAuthenticated(Client* client)
disconnect(client, SIGNAL(authenticated(Client*)), this, SLOT(onClientAuthenticated(Client*)));
connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*)));
connect(client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(onVncClientStateChange(Client*)));
- bool hasActiveTutor = false;
ConnectionFrame *existing = NULL;
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
// qDebug() << "Existing frame ip: " << (*it)->computerId();
@@ -1218,27 +1217,11 @@ void MainWindow::onClientAuthenticated(Client* client)
if ((*it)->computerId() == client->ip()) {
existing = *it;
}
- if ((*it)->isTutor()) {
- if ((*it)->client() != NULL)
- hasActiveTutor = true;
- }
}
-
- bool isTutor = false;
- if (!hasActiveTutor) {
- for (int i = 0; i < _tutorList.size(); i++) {
- // Check if client is possible tutor
- if (client->ip() == _tutorList[i]) {
- isTutor = true;
- break;
- }
- }
- }
// Clients ip already exists, but was not active.
if (existing != NULL) {
// qDebug() << "Should go into this if clause.";
- existing->setTutor(isTutor);
existing->assignClient(client);
tellClientCurrentSituation(client);
updateExamMode();
@@ -1249,8 +1232,6 @@ void MainWindow::onClientAuthenticated(Client* client)
ConnectionFrame *cf = createFrame();
// Move to any free tile
placeFrameInFreeSlot(cf);
- // Set Tutor option
- cf->setTutor(isTutor);
// Assign client instance
cf->assignClient(client);