summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2018-07-12 16:29:18 +0200
committerSimon Rettberg2018-07-12 16:29:18 +0200
commit9ddaabf901f6c31f8d577410182f50dc1c37f955 (patch)
tree83de458c12cea1aeb0525a345ca303ee53056b16
parent[server] Add button to lock/unlock single client (diff)
downloadpvs2-9ddaabf901f6c31f8d577410182f50dc1c37f955.tar.gz
pvs2-9ddaabf901f6c31f8d577410182f50dc1c37f955.tar.xz
pvs2-9ddaabf901f6c31f8d577410182f50dc1c37f955.zip
[server] Fix (=implement) tracking of client's projection source
We never stored the current projection source id in the according field of class Client, breaking intended functionality when cancelling projection.
-rw-r--r--src/server/net/client.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/net/client.cpp b/src/server/net/client.cpp
index 7f94983..0dd8783 100644
--- a/src/server/net/client.cpp
+++ b/src/server/net/client.cpp
@@ -184,10 +184,11 @@ void Client::handleMsg()
emit stateChanged();
} else if (id == _VNCCLIENT) {
// Client tells us that it started or stopped displaying a remote screen via VNC
- const int projectionSource = (int)_fromClient.getFieldString("CLIENTID").toInt();
+ const int projectionSource = _fromClient.getFieldString("CLIENTID").toInt();
if (_fromClient.getFieldString("ENABLED").toInt() != 0) {
qDebug() << "Client " << _name << " started its VNC client (watching " << projectionSource << ")";
_isActiveVncClient = true;
+ _projectionSource = projectionSource;
emit vncClientStateChange(this);
} else {
qDebug() << "Client " << _name << " stopped its VNC client (watched " << projectionSource << ")";