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

2016-09-20 Thread git-admin
This is an automated email from the git hooks/post-receive script.

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

commit e140bec7e1c17bc89d959ec92ade3d577888dbc5
Author: Mihai Moldovan 
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 7bfbf7f..ca50bbe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -243,6 +243,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.
 
  -- X2Go Release Manager   Mon, 19 Sep 2016 09:07:07 +0200
 
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
___
x2go-commits mailing list
x2go-commits@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-commits


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

2016-08-27 Thread git-admin
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 
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 .
 - 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
___
x2go-commits mailing list
x2go-commits@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-commits