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

git-admin at x2go.org git-admin at x2go.org
Wed Jan 18 12:25:33 CET 2017


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

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

commit 7921f0dd3edd71a2f978d157296f231cb9124a41
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 d76bec3..eed5012 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -273,6 +273,7 @@ x2goclient (4.0.5.3-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.
 
   [ Bernard Cafarelli ]
   * New upstream version (4.0.5.3):
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