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

git-admin at x2go.org git-admin at x2go.org
Thu Sep 22 04:36:43 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 ce9f7d54e4722302270f95d0b03573b65f7d2b3e
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 942f4c8..6ceb448 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -185,6 +185,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
       server_working_dir_ class variables.
     - pulsemanager.cpp: make start () wrap the "real" OS-specific start
       functions.
+    - pulsemanager.{cpp,h}: new function create_client_dir ().
 
  -- X2Go Release Manager <git-admin at x2go.org>  Mon, 19 Sep 2016 09:07:07 +0200
 
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