[X2Go-Commits] [x2goclient] 132/280: 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
Wed Jan 18 12:25:28 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit 1d19c5d806684758a9ab011e117d98720e140296
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 b796427..935660c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -253,6 +253,8 @@ x2goclient (4.0.5.3-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.
[ Bernard Cafarelli ]
* New upstream version (4.0.5.3):
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