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

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

commit 5797b77713d0ba1b17c83619ea6226f68238a302
Author: Mihai Moldovan <io...@ionic.de>
Date:   Sat May 7 22:28:38 2016 +0200

    src/pulsemanager.cpp: don't time out while trying to start PA or paplay.
    
    "Handle" errors by printing out debug messages.
---
 debian/changelog     |    2 ++
 src/pulsemanager.cpp |   16 ++++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9ca6ac2..70fa9ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -275,6 +275,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
       declaration for set_debug ().
     - res/sound: add startup.wav sound to be played back when starting the PA
       daemon in debug mode.
+    - src/pulsemanager.cpp: don't time out while trying to start PA or paplay.
+      "Handle" errors by printing out debug messages.
 
  -- 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 ed841eb..ee6c63c 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -132,7 +132,12 @@ void PulseManager::start_generic () {
   pulse_server_->setWorkingDirectory (server_working_dir_);
 
   pulse_server_->start (server_binary_, server_args_);
-  if (pulse_server_->waitForStarted ()) {
+
+  /*
+   * We may wait here, because PulseManager runs in a separate thread.
+   * Otherwise, we'd better use signals and slots to not block the main thread.
+   */
+  if (pulse_server_->waitForStarted (-1)) {
     x2goDebug << "pulse started with arguments" << server_args_ << "; waiting 
for finish...";
     state_ = QProcess::Running;
 
@@ -144,6 +149,9 @@ void PulseManager::start_generic () {
       QTimer::singleShot (3000, this, SLOT (slot_play_startup_sound ()));
     }
   }
+  else {
+    x2goErrorf (27) << "PulseAudio failed to start! Sound support will not be 
available.";
+  }
 }
 
 void PulseManager::start_osx () {
@@ -562,8 +570,12 @@ void PulseManager::slot_play_startup_sound () {
     play_file.setProcessEnvironment (env_);
     play_file.start (play_file_binary, args);
 
-    if (play_file.waitForStarted ())
+    if (play_file.waitForStarted (-1)) {
       play_file.waitForFinished ();
+    }
+    else {
+      x2goErrorf (26) << "Unable to play startup sound! Something may be 
wrong.";
+    }
   }
 }
 

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