[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
Mon Jan 18 22:49:04 CET 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 555835c64a2d553a3af9e6787ef300ba681475f9
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 4102dd7..03e939c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -242,6 +242,8 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low
(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.
* debian/control:
- Change apache2-dev | libc6-dev build dependency back to apache2-dev
only. Otherwise, apache2-dev is not installed at all, even though
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