This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit 9ed1ec5bcec74fefe71b5068d7c8eb486618f48c
Author: Mihai Moldovan <io...@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 a6c8375..4638931 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -223,6 +223,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.
 
  -- X2Go Release Manager <git-ad...@x2go.org>  Mon, 19 Sep 2016 09:07:07 +0200
 
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
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-commits

Reply via email to