[pkg-remote-commits] [python-x2go] 01/15: debian/patches: Add 0001_check-lock-state-before-releasing.patch. Required for flawless operation with gevent 1.1. (Closes: #862896).
Mike Gabriel
sunweaver at debian.org
Mon Sep 25 12:43:12 UTC 2017
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository python-x2go.
commit 2dd004b26a23d8926ab92ee9e44cf685e9da682e
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Thu May 18 13:10:21 2017 +0200
debian/patches: Add 0001_check-lock-state-before-releasing.patch. Required for flawless operation with gevent 1.1. (Closes: #862896).
---
.../0001_check-lock-state-before-releasing.patch | 102 +++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 103 insertions(+)
diff --git a/debian/patches/0001_check-lock-state-before-releasing.patch b/debian/patches/0001_check-lock-state-before-releasing.patch
new file mode 100644
index 0000000..9f64033
--- /dev/null
+++ b/debian/patches/0001_check-lock-state-before-releasing.patch
@@ -0,0 +1,102 @@
+commit 3ed4fed3465e02c605c80e057c265ca4a5d4b2ac
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+Date: Tue May 9 12:24:20 2017 +0200
+
+ Don't blindly release gevent locked. We need to checked if a semaphore is locked in some case and only then release it. (Fixes: #1016).
+
+#diff --git a/debian/changelog b/debian/changelog
+#index aeca116..cd549f0 100644
+#--- a/debian/changelog
+#+++ b/debian/changelog
+#@@ -3,6 +3,9 @@ python-x2go (0.5.0.5-0x2go1) UNRELEASED; urgency=low
+# [ Mike Gabriel ]
+# * New upstream version (0.5.0.5):
+# - documentation: Fix wording in docstring.
+#+ - Don't blindly release gevent locked. We need to checked if a
+#+ semaphore is locked in some case and only then release it.
+#+ (Fixes: #1016).
+#
+# [ Mihai Moldovan ]
+# * New upstream version (0.5.0.5):
+diff --git a/x2go/backends/control/plain.py b/x2go/backends/control/plain.py
+index 73807e5..3dcc3ef 100644
+--- a/x2go/backends/control/plain.py
++++ b/x2go/backends/control/plain.py
+@@ -324,7 +324,8 @@ class X2GoControlSession(paramiko.SSHClient):
+ timer.cancel()
+
+ self.sftp_client = None
+- self._transport_lock.release()
++ if self._transport_lock.locked():
++ self._transport_lock.release()
+
+ def _x2go_sftp_write(self, remote_path, content, timeout=20):
+ """
+@@ -380,7 +381,8 @@ class X2GoControlSession(paramiko.SSHClient):
+ timer.cancel()
+
+ self.sftp_client = None
+- self._transport_lock.release()
++ if self._transport_lock.locked():
++ self._transport_lock.release()
+
+ def _x2go_sftp_remove(self, remote_path, timeout=20):
+ """
+@@ -431,7 +433,8 @@ class X2GoControlSession(paramiko.SSHClient):
+ timer.cancel()
+
+ self.sftp_client = None
+- self._transport_lock.release()
++ if self._transport_lock.locked():
++ self._transport_lock.release()
+
+ def _x2go_exec_command(self, cmd_line, loglevel=log.loglevel_INFO, timeout=20, **kwargs):
+ """
+@@ -520,7 +523,8 @@ class X2GoControlSession(paramiko.SSHClient):
+ self._transport_lock.release()
+ raise x2go_exceptions.X2GoControlSessionException('the X2Go control session is not connected (while issuing SSH command=%s)' % cmd)
+
+- self._transport_lock.release()
++ if self._transport_lock.locked():
++ self._transport_lock.release()
+
+ # sanitized X2Go relevant data, protect against data injection via .bashrc files
+ (_stdin, _stdout, _stderr) = _retval
+@@ -1204,7 +1208,8 @@ class X2GoControlSession(paramiko.SSHClient):
+ self._session_auth_rsakey = None
+
+ # in any case, release out internal transport lock
+- self._transport_lock.release()
++ if self._transport_lock.locked():
++ self._transport_lock.release()
+
+ # close SSH agent auth forwarding objects
+ if self.agent_handler is not None:
+diff --git a/x2go/backends/terminal/plain.py b/x2go/backends/terminal/plain.py
+index 786ad8d..1ea43ea 100644
+--- a/x2go/backends/terminal/plain.py
++++ b/x2go/backends/terminal/plain.py
+@@ -421,7 +421,8 @@ class X2GoTerminalSession(object):
+ - clear the session info
+
+ """
+- self._share_local_folder_lock.release()
++ if self._share_local_folder_lock.locked():
++ self._share_local_folder_lock.release()
+ self.release_telekinesis()
+ self.release_proxy()
+ self.session_window = None
+diff --git a/x2go/session.py b/x2go/session.py
+index d37c038..b1f836d 100644
+--- a/x2go/session.py
++++ b/x2go/session.py
+@@ -1374,7 +1374,8 @@ class X2GoSession(object):
+ self.terminated = None
+ self.faults = None
+ self.active = False
+- self._lock.release()
++ if self._lock.locked():
++ self._lock.release()
+ self.unset_master_session()
+ try:
+ self.update_status(force_update=True)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e4de2a9
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001_check-lock-state-before-releasing.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-remote/python-x2go.git
More information about the pkg-remote-commits
mailing list