[X2go-Commits] python-x2go.git - master (branch) updated: 0.1.0.3-41-gaaa397d

X2go dev team git-admin at x2go.org
Thu Jun 23 14:27:22 CEST 2011


The branch, master has been updated
       via  aaa397d3fb7760faef93327028199cc242fcb194 (commit)
       via  ddce72c987c36e2adf9746c257d993d6dcd960cd (commit)
      from  912ce42c8e9222d6c31a4ef9409e20d3f692f9cb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit aaa397d3fb7760faef93327028199cc242fcb194
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Jun 23 14:27:19 2011 +0200

    Fix NX proxy startup post-check.

commit ddce72c987c36e2adf9746c257d993d6dcd960cd
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Jun 23 14:26:42 2011 +0200

    Do not start X2go service tunnels (audio, sshfs) if session startup failed.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                  |    2 ++
 x2go/backends/proxy/_nx3.py       |    2 +-
 x2go/backends/proxy/base.py       |   12 +++++++++++-
 x2go/backends/terminal/_stdout.py |    2 +-
 x2go/session.py                   |    2 +-
 5 files changed, 16 insertions(+), 4 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 418c440..7c04f4b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,8 @@ python-x2go (0.1.1.0-0~x2go1) UNRELEASED; urgency=low
     - Add X2goSession lock support.
     - Skip session auto registration during startups of new sessions (avoids
       duplicate sessions in the session registry.
+    - Do not start X2go service tunnels (audio, sshfs) if session startup failed.
+    - Fix NX proxy startup post-check.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Thu, 23 Jun 2011 08:34:14 +0200
 
diff --git a/x2go/backends/proxy/_nx3.py b/x2go/backends/proxy/_nx3.py
index 5f1f30f..2a5b8a0 100644
--- a/x2go/backends/proxy/_nx3.py
+++ b/x2go/backends/proxy/_nx3.py
@@ -172,7 +172,7 @@ options=%s""" % ( self.proxy_options['xkbrules'],
 
         p = base.X2goProxyBASE.start_proxy(self)
 
-        if p is not None:
+        if self.ok():
             self.logger('NX3 proxy is up and running.', loglevel=log.loglevel_INFO)
         else:
             self.logger('Bringing up NX3 proxy failed.', loglevel=log.loglevel_ERROR)
diff --git a/x2go/backends/proxy/base.py b/x2go/backends/proxy/base.py
index 5f92e57..0a3fc34 100644
--- a/x2go/backends/proxy/base.py
+++ b/x2go/backends/proxy/base.py
@@ -131,7 +131,7 @@ class X2goProxyBASE(threading.Thread):
         if left open.
 
         """
-        if self.proxy is not None and self.proxy.poll() is None:
+        if self.ok():
             self.logger('Shutting down X2go proxy subprocess', loglevel=log.loglevel_DEBUG)
             self.proxy.kill()
         if self.fw_tunnel is not None:
@@ -266,3 +266,13 @@ class X2goProxyBASE(threading.Thread):
             gevent.sleep(.5)
 
         return self.proxy
+
+    def ok(self):
+        """\
+        Check if a proxy instance is up and running.
+
+        @return: Proxy state (C{True} or C{False})
+        @rtype C{bool}
+
+        """
+        return self.proxy and self.proxy.poll is not None
diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py
index c13c11e..0ecf4ee 100644
--- a/x2go/backends/terminal/_stdout.py
+++ b/x2go/backends/terminal/_stdout.py
@@ -765,7 +765,7 @@ class X2goTerminalSessionSTDOUT(object):
         @rtype: bool
 
         """
-        return bool(self.session_info.name and (self.proxy_subprocess and self.proxy_subprocess.poll() is None))
+        return bool(self.session_info.name and (self.proxy.ok())
 
     def is_running(self):
         """\
diff --git a/x2go/session.py b/x2go/session.py
index cb101b1..3a821bd 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -964,7 +964,7 @@ class X2goSession(object):
                 _new_session = True
                 self.session_name = self.terminal_session.session_info.name
 
-            if self.has_terminal_session():
+            if self.has_terminal_session() and not self.faulty:
 
                 if SUPPORTED_SOUND and self.terminal_session.params.snd_system is not 'none':
                     self.terminal_session.start_sound()


hooks/post-receive
-- 
python-x2go.git (Python X2go Client API)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2go Client API).




More information about the x2go-commits mailing list