diff options
author | Manuel Schneider | 2014-04-23 18:04:42 +0200 |
---|---|---|
committer | Manuel Schneider | 2014-04-23 18:04:42 +0200 |
commit | bc83b49dc11afffeb2e3267b756fe91bb195f023 (patch) | |
tree | 21f5f5d19892b02c21d92f60f2b5ea16510106fa /src/server/net/client.cpp | |
parent | Fixed, that inactive Client can be manually choosen as Tutor. (diff) | |
download | pvs2-bc83b49dc11afffeb2e3267b756fe91bb195f023.tar.gz pvs2-bc83b49dc11afffeb2e3267b756fe91bb195f023.tar.xz pvs2-bc83b49dc11afffeb2e3267b756fe91bb195f023.zip |
[SERVER] Fixed tracking of which clients is watching (trying to watch) which
other client
Diffstat (limited to 'src/server/net/client.cpp')
-rw-r--r-- | src/server/net/client.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/server/net/client.cpp b/src/server/net/client.cpp index 3adeeaa..f3cbc0d 100644 --- a/src/server/net/client.cpp +++ b/src/server/net/client.cpp @@ -195,11 +195,16 @@ void Client::handleMsg() qDebug() << "Starting VNC server on client" << _name << " (" << _ip << ") failed."; // TODO: Show message on manager } + else + { + qDebug() << "Client " << _name << " stopped its VNC server"; + } } else { _vncRoPass = _fromClient.getFieldString("ROPASS"); _vncRwPass = _fromClient.getFieldString("RWPASS"); + qDebug() << "Client " << _name << " started its VNC server"; } _vncPort = port; emit vncServerStateChange(this); @@ -210,14 +215,19 @@ void Client::handleMsg() _activeVncClient = (_fromClient.getFieldString("ENABLED").toInt() != 0); const int other = (int)_fromClient.getFieldString("CLIENTID").toInt(); - if (!_activeVncClient && other == 0) - _desiredProjectionSource = 0; + int last = (_currentProjectionSource != 0 ? _currentProjectionSource : _desiredProjectionSource); - int last = _currentProjectionSource; if (!_activeVncClient) + { _currentProjectionSource = 0; + _desiredProjectionSource = 0; + qDebug() << "Client " << _name << " stopped its VNC client (watched " << last << ")"; + } else + { _currentProjectionSource = other; + qDebug() << "Client " << _name << " started its VNC client (watching " << other << ")"; + } emit vncClientStateChange(this, last); } |