[X2Go-Commits] [x2goclient] 106/139: pulsemanager.{cpp, h}: new function create_client_dir ().

git-admin at x2go.org git-admin at x2go.org
Wed Jan 13 18:42:19 CET 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 5ab7a2ee79ae1812fd961bd89aaed5938ea81bfa
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Oct 30 03:05:53 2015 +0100

    pulsemanager.{cpp,h}: new function create_client_dir ().
---
 debian/changelog     |    1 +
 src/pulsemanager.cpp |   11 +++++++++++
 src/pulsemanager.h   |    1 +
 3 files changed, 13 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index bc3f917..bdf5d98 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -193,6 +193,7 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low
       server_working_dir_ class variables.
     - pulsemanager.cpp: make start () wrap the "real" OS-specific start
       functions.
+    - pulsemanager.{cpp,h}: new function create_client_dir ().
   * debian/control:
     - Change apache2-dev | libc6-dev build dependency back to apache2-dev
       only. Otherwise, apache2-dev is not installed at all, even though
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index f094019..f686dce 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -230,6 +230,17 @@ void PulseManager::cleanup_client_dir () {
     machine_dir.remove (machine_dir.absolutePath ());
 }
 
+void PulseManager::create_client_dir () {
+  QDir machine_dir (pulse_dir_.absolutePath () + "/.pulse/"
+                    + QHostInfo::localHostName () + "-runtime");
+
+  if (!machine_dir.exists ())
+    machine_dir.mkpath (machine_dir.absolutePath ());
+
+  if (QFile::exists (machine_dir.absolutePath () + "/pid"))
+    QFile::remove (machine_dir.absolutePath () + "/pid");
+}
+
 void PulseManager::slot_play_startup_sound () {
   QProcess play_file (0);
 
diff --git a/src/pulsemanager.h b/src/pulsemanager.h
index 99b3d4a..e5f4b87 100644
--- a/src/pulsemanager.h
+++ b/src/pulsemanager.h
@@ -66,6 +66,7 @@ class PulseManager: public QObject {
     bool generate_server_config ();
     bool generate_client_config ();
     void cleanup_client_dir ();
+    void create_client_dir ();
     void shutdown ();
     bool is_server_running ();
 

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