[X2Go-Commits] [x2goclient] 132/138: pulsemanager.{cpp, h}: only allow changing PA or ESD ports when server is not currently running.
git-admin at x2go.org
git-admin at x2go.org
Thu Mar 31 20:58:44 CEST 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit 3d42f28cad4bae607c3c447edda80bb896ecc98f
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Dec 31 00:55:17 2015 +0100
pulsemanager.{cpp,h}: only allow changing PA or ESD ports when server is not currently running.
---
debian/changelog | 2 ++
src/pulsemanager.cpp | 22 ++++++++++++++++++----
src/pulsemanager.h | 4 ++--
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b841b20..af27966 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -228,6 +228,8 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium
(hopefully) logical fashion.
- pulsemanager.cpp: add algorithm for actually extracting PA version
number.
+ - pulsemanager.{cpp,h}: only allow changing PA or ESD ports when server is
+ not currently running.
[ Mike DePaulo ]
* New upstream release (4.0.5.2):
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index 09fb791..7ffdfcf 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -554,12 +554,26 @@ std::uint16_t PulseManager::get_esd_port () {
return (esd_port_);
}
-void PulseManager::set_pulse_port (std::uint16_t pulse_port) {
- pulse_port_ = pulse_port;
+bool PulseManager::set_pulse_port (std::uint16_t pulse_port) {
+ bool ret = false;
+
+ if (!(is_server_running ())) {
+ pulse_port_ = pulse_port;
+ ret = true;
+ }
+
+ return (ret);
}
-void PulseManager::set_esd_port (std::uint16_t esd_port) {
- esd_port_ = esd_port;
+bool PulseManager::set_esd_port (std::uint16_t esd_port) {
+ bool ret = false;
+
+ if (!(is_server_running ())) {
+ esd_port_ = esd_port;
+ ret = true;
+ }
+
+ return (ret);
}
void PulseManager::restart () {
diff --git a/src/pulsemanager.h b/src/pulsemanager.h
index ec5e27c..3dbd94f 100644
--- a/src/pulsemanager.h
+++ b/src/pulsemanager.h
@@ -52,8 +52,8 @@ class PulseManager: public QObject {
std::uint16_t get_pulse_port ();
std::uint16_t get_esd_port ();
- void set_pulse_port (std::uint16_t pulse_port);
- void set_esd_port (std::uint16_t esd_port);
+ bool set_pulse_port (std::uint16_t pulse_port);
+ bool set_esd_port (std::uint16_t esd_port);
public slots:
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list