summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 1efc87a..26508d2 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -56,6 +56,7 @@ MainWindow::MainWindow(QString ipListUrl, QWidget* parent) :
_tutorFrame = NULL;
_selectedFrame = NULL;
+ _streamingSource = NULL;
_sessionNameWindow = new SessionNameWindow(this);
_helpWindow = new HelpWindow(this);
@@ -703,11 +704,17 @@ void MainWindow::onClientConnected(Client* client)
/***************************************************************************//**
* Authenticate new Client client.
+ * Check if incoming client ip already exists,
+ * if yes --> return.
+ * Check if same name of client already exist,
+ * if yes --> name new client as name(x).
+ * x = number of clients with the same name.
* @param client
* @param request
*/
void MainWindow::onClientAuthenticating(Client* client, ClientLogin* request)
{
+ qDebug("onClientAuthenticating - Slot was called.");
disconnect(client, SIGNAL(authenticating(Client*, ClientLogin*)), this, SLOT(onClientAuthenticating(Client*, ClientLogin*)));
if (!request->accept) // Another receiver of that signal already rejected the client, so nothing to do
return;
@@ -744,12 +751,18 @@ void MainWindow::onClientAuthenticating(Client* client, ClientLogin* request)
}
/***************************************************************************//**
- * After authenticating new client, check if that's the first one and set tutor if necessary.
- * Also check the current VNC status and take these setting also for the new client.
+ * New client was authenticated, make several checks.
+ * Check if new clients ip already exists,
+ * if yes --> not necessary to create new clientFrame.
+ * if not --> create a new one and adapt this one to current
+ * situation in class room(projection / lock screen).
+ * Check if avctiv tutor is available,
+ * if not --> check if new client is possible tutor.
* @param client
*/
void MainWindow::onClientAuthenticated(Client* client)
{
+ qDebug("Entering onClientAuthenticated - Slot.");
disconnect(client, SIGNAL(authenticated(Client*)), this, SLOT(onClientAuthenticated(Client*)));
connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*)), Qt::QueuedConnection);
connect(client, SIGNAL(vncClientStateChange(Client*, int)), this, SLOT(onVncClientStateChange(Client*, int)), Qt::QueuedConnection);
@@ -779,7 +792,7 @@ void MainWindow::onClientAuthenticated(Client* client)
}
}
}
-
+ // Clients ip already exists, but was not active.
if (existing != NULL)
{
existing->setTutor(isTutor);