summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-05-26 18:34:36 +0200
committerBjörn Hagemeister2014-05-26 18:34:36 +0200
commit494727e1e5f0e459153e8845168545ad4a72e598 (patch)
tree1d0328d6b7ea8d53aec693fa06681379cb20b998 /src/server/mainwindow/mainwindow.cpp
parentMerge branch 'master' of git.openslx.org:pvs2 (diff)
downloadpvs2-494727e1e5f0e459153e8845168545ad4a72e598.tar.gz
pvs2-494727e1e5f0e459153e8845168545ad4a72e598.tar.xz
pvs2-494727e1e5f0e459153e8845168545ad4a72e598.zip
Several changes:
Fixed segmentaion fault, which occured after streaming to all clients. Added sessionName as command line argument to client, so that it connects immediatly after running to given sessionName. If pvsclient shows connected status also display IP-Adress of the running pvsmanager.
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);