From 494727e1e5f0e459153e8845168545ad4a72e598 Mon Sep 17 00:00:00 2001 From: Björn Hagemeister Date: Mon, 26 May 2014 18:34:36 +0200 Subject: 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. --- src/server/mainwindow/mainwindow.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/server/mainwindow/mainwindow.cpp') 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); -- cgit v1.2.3-55-g7522