summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsr2013-02-05 17:51:20 +0100
committersr2013-02-05 17:51:20 +0100
commitd0c6dede6cb4b21b4d935a75d852e41b3bcc64b9 (patch)
treebe45785e697d977945d3763ebcbd37cc2f047739 /src
parent[SERVER] Implement all four VNC projection modes (diff)
downloadpvs2-d0c6dede6cb4b21b4d935a75d852e41b3bcc64b9.tar.gz
pvs2-d0c6dede6cb4b21b4d935a75d852e41b3bcc64b9.tar.xz
pvs2-d0c6dede6cb4b21b4d935a75d852e41b3bcc64b9.zip
[SERVER] fix vnc startup command
Diffstat (limited to 'src')
-rw-r--r--src/server/mainwindow/mainwindow.cpp8
-rw-r--r--src/server/net/client.cpp2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 48a1a57..67d88d0 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -357,17 +357,22 @@ void MainWindow::prepareForProjection(Client * const from, Client * const to)
{
// Projection source is never allowed to be an active VNC viewer
if (from->isActiveVncClient())
+ {
+ qDebug("From is active client, stopping...");
from->stopVncClient();
+ }
if (to == NULL)
{
// One to many
+ qDebug("One to many requested...");
from->setProjectionSource(true);
if (from->isActiveVncServer())
{
// From is already active, if there is at least one active client, assume it is not
// shutting down, so we can directly tell the new client to connect to it
+ qDebug("Source is already running a VNC server....");
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
{
Client *c = (**it).client();
@@ -376,11 +381,14 @@ void MainWindow::prepareForProjection(Client * const from, Client * const to)
if (c->currentProjectionSource() != from->id())
continue;
// Yep :-)
+ qDebug("Reusing because of active client");
this->onVncServerStateChange(from);
return;
}
+ qDebug("But no active client found....");
}
// Could not take shortcut, (re)start VNC server on source
+ qDebug("Starting VNC server on source machine");
from->startVncServer();
return;
}
diff --git a/src/server/net/client.cpp b/src/server/net/client.cpp
index e2ea933..30e323a 100644
--- a/src/server/net/client.cpp
+++ b/src/server/net/client.cpp
@@ -264,7 +264,7 @@ void Client::startVncServer()
_vncPort = 0;
_toClient.reset();
_toClient.setField(_ID, _VNCSERVER);
- _toClient.setField(_ENABLE, __FALSE);
+ _toClient.setField(_ENABLE, __TRUE);
sendMessage(_toClient);
}