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

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

commit 7b9a00e18261d897792236d76432c7410782501e
Author: Mihai Moldovan <io...@ionic.de>
Date:   Wed Jun 22 02:33:27 2016 +0200

    src/pulsemanager.cpp: correctly initialize and set system_pulse_ when 
required.
---
 debian/changelog     |    2 ++
 src/pulsemanager.cpp |   14 +++++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 511fa3a..dfd1990 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -312,6 +312,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
     - src/x2goutils.cpp: fix compile error.
     - src/pulsemanager.h: add new system_pulse_ variable to indicate that
       a system PA binary shall be used.
+    - src/pulsemanager.cpp: correctly initialize and set system_pulse_ when
+      required.
 
  -- 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 8e25b77..9ec2da8 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -45,7 +45,8 @@ PulseManager::PulseManager () : app_dir_ 
(QApplication::applicationDirPath ()),
                                 pulse_version_misc_ (""),
                                 record_ (true),
                                 playback_ (true),
-                                debug_ (false) {
+                                debug_ (false),
+                                system_pulse_ (false) {
   pulse_dir_ = QDir (QDir::homePath ());
   pulse_dir_.mkpath (pulse_dir_.absolutePath () + pulse_X2Go_ + "/tmp");
   pulse_dir_.cd (pulse_X2Go_.mid (1));
@@ -84,6 +85,9 @@ PulseManager::PulseManager () : app_dir_ 
(QApplication::applicationDirPath ()),
       x2goErrorf (29) << "Unable to find PulseAudio binary. Neither bundled, 
nor found in $PATH nor additional directories.";
       abort ();
     }
+    else {
+      system_pulse_ = true;
+    }
   }
 #else /* QT_VERSION < 0x050000 */
   QStringList search_paths;
@@ -114,6 +118,14 @@ PulseManager::PulseManager () : app_dir_ 
(QApplication::applicationDirPath ()),
         }
       }
     }
+
+    /*
+     * The detection above either failed or succeeded.
+     * Failure means that the program already stopped,
+     * success means that all code reaches this point.
+     * Be careful when refactoring this code.
+     */
+    system_pulse_ = true;
   }
 #endif /* QT_VERSION < 0x050000 */
 

--
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