summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/mainwindow/mainwindow.cpp19
-rw-r--r--src/server/net/listenserver.cpp1
-rw-r--r--src/server/net/sslserver.cpp1
3 files changed, 18 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);
diff --git a/src/server/net/listenserver.cpp b/src/server/net/listenserver.cpp
index 8eb3750..859ee33 100644
--- a/src/server/net/listenserver.cpp
+++ b/src/server/net/listenserver.cpp
@@ -32,6 +32,7 @@ ListenServer::~ListenServer()
*/
void ListenServer::newClientConnection()
{
+ qDebug("Listenserver::newClientConnection().");
QSslSocket* sock;
while ((sock = (QSslSocket*)_server.nextPendingConnection()) != NULL)
{
diff --git a/src/server/net/sslserver.cpp b/src/server/net/sslserver.cpp
index 4ea3991..65a40b4 100644
--- a/src/server/net/sslserver.cpp
+++ b/src/server/net/sslserver.cpp
@@ -36,6 +36,7 @@ SslServer::~SslServer()
*/
void SslServer::incomingConnection(int socketDescriptor)
{
+ qDebug("SslServer:incomingConnection.");
QSslSocket *serverSocket = new QSslSocket(NULL);
connect(serverSocket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(sslErrors(const QList<QSslError> &)));
QSslKey key;