This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 9e6405db5c65550cf357fff9fe9e974c94741e78 Author: Mihai Moldovan <ionic@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 ea4a079..ff2bd8f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -249,6 +249,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/Modul... + * + * 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