[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.2.0.10-45-gf7b6768

X2Go dev team git-admin at x2go.org
Wed Jan 8 15:27:20 CET 2014


The branch, build-baikal has been updated
       via  f7b6768fd794368b50dd6405b0068b2e2b72d28c (commit)
      from  e96a2aa11681e12b5120f28d6756aafe1400412b (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog |    1 +
 x2go/registry.py |    8 ++++++++
 2 files changed, 9 insertions(+)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 3d2e3aa..966718a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,7 @@ python-x2go (0.2.1.0-0~x2go1) UNRELEASED; urgency=low
       need the monkey patching for paramiko >= 1.8.0 anymore).
     - Rename session type XFCE4 to XFCE (using an unversioned name).
     - Avoid false positive notifications about started-by-other sessions.
+    - Introduce locks for session registrations.
   * /debian/rules:
     + Allow package build on systems with missing dh_python2.
   * /debian/control:
diff --git a/x2go/registry.py b/x2go/registry.py
index 001ae6d..3d07564 100644
--- a/x2go/registry.py
+++ b/x2go/registry.py
@@ -27,6 +27,7 @@ import os
 import copy
 import types
 import time
+import threading
 
 # Python X2Go modules
 import log
@@ -79,6 +80,7 @@ class X2goSessionRegistry(object):
 
         self._last_available_session_registration = None
         self._skip_auto_registration = False
+        self._profile_locks = {}
 
     def keys(self):
         """\
@@ -507,6 +509,11 @@ class X2goSessionRegistry(object):
         @rtype: C{str}
 
         """
+        if profile_id not in self.profile_locks.keys():
+            self._profile_locks[profile_id] = threading.Lock()
+
+        self._profile_locks[profile_id].acquire()
+
         control_session = None
         if profile_id in self.control_sessions.keys():
             control_session = self.control_sessions[profile_id]
@@ -574,6 +581,7 @@ class X2goSessionRegistry(object):
         if control_session is None:
             self(session_uuid).do_auto_connect()
 
+        self._profile_locks[profile_id].release()
         return session_uuid
 
     def has_session_of_session_name(self, session_name):


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