[X2Go-Commits] [x2goclient] 146/217: src/pulsemanager.cpp: backport fix for 422.

git-admin at x2go.org git-admin at x2go.org
Sat Aug 27 19:25:57 CEST 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 b39627202a60592ff59f34dcc1580c6903958d1f
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Apr 27 02:16:49 2016 +0200

    src/pulsemanager.cpp: backport fix for 422.
---
 debian/changelog     |    1 +
 src/pulsemanager.cpp |   24 +++++++++++++++++++++++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 3955c9d..189a09d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -276,6 +276,7 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium
       depending on the detected PA version.
     - src/pulsemanager.cpp: add "FIXME" debug logging (and cleanup.)
     - src/pulsemanager.cpp: backport fix for 526.
+    - src/pulsemanager.cpp: backport fix for 422.
   * debian/control:
     - Maintainer change in package: X2Go Developers <x2go-dev at lists.x2go.org>.
     - Uploaders: add myself. Also, force a rebuild due to the changed
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index c8fc7cd..fb0d5eb 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -403,7 +403,29 @@ bool PulseManager::generate_server_config () {
     QTextStream config_tmp_file_stream (&config_tmp_file);
 
     config_tmp_file_stream << "load-module module-native-protocol-tcp port="
-                            + QString::number (pulse_port_) << endl;
+                            + QString::number (pulse_port_);
+
+    /*
+     * Reference:
+     * http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index22h3
+     *
+     * Setting auth-cookie fixes bug #422.
+     *
+     * PulseAudio 6.0 changed the path that auth-cookie is relative to, so
+     * Tanu Kaskinen recommended we specify the absolute path instead.
+     * The absolute path works with at least 5.0 and 6.0.
+     */
+    if (pulse_version_major_ > 2) {
+      QString tmp_auth_cookie = QDir::toNativeSeparators (wapiShortFileName (pulse_dir_.absolutePath ()))
+                              + "\\.pulse-cookie";
+
+      /* Double backslashes are required in config.pa. */
+      tmp_auth_cookie.replace ("\\", "\\\\");
+
+      config_tmp_file_stream << " auth-cookie=" + tmp_auth_cookie;
+    }
+
+    config_tmp_file_stream << endl;
 
 #ifdef Q_OS_UNIX
     config_tmp_file_stream << "load-module module-native-protocol-unix" << endl;

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