[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 3d0f0b665c8bbf1b3e928acde80e6ab381da28c8
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:27:19 CET 2014
The branch, build-baikal has been updated
via 3d0f0b665c8bbf1b3e928acde80e6ab381da28c8 (commit)
from d0e7bbcbaee91f52a00ad41530fbf1bfc0b12243 (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:
x2go/proxy.py | 18 +++++++++++++++---
x2go/session.py | 2 +-
2 files changed, 16 insertions(+), 4 deletions(-)
The diff of changes is:
diff --git a/x2go/proxy.py b/x2go/proxy.py
index 0cfeee8..01280b8 100644
--- a/x2go/proxy.py
+++ b/x2go/proxy.py
@@ -147,11 +147,16 @@ class X2goProxy(threading.Thread):
# file exists
pass
+ local_graphics_port = self.session_info.graphics_port
while self.fw_tunnel is None:
- self.fw_tunnel = forward.start_forward_tunnel(self.session_info.graphics_port, "localhost", self.session_info.graphics_port, self.ssh_transport, logger=self.logger, )
+ self.fw_tunnel = forward.start_forward_tunnel(local_graphics_port, "localhost", self.session_info.graphics_port, self.ssh_transport, logger=self.logger, )
if self.fw_tunnel is None:
- self.logger('socket [localhost]:%s is in use, waiting for it to free' % self.session_info.graphics_port, log.loglevel_INFO)
- gevent.sleep(1)
+ self.logger('socket [localhost]:%s is in use, trying local TCP/IP socket port: [localhost]:%s' % (local_graphics_port, local_graphics_port+1), log.loglevel_INFO)
+ local_graphics_port += 1
+ gevent.sleep(.1)
+
+ # update the proxy port in PROXY_ARGS
+ self._update_local_proxy_socket(local_graphics_port)
cmd_line = [ self.PROXY_CMD, ]
cmd_line.extend(self.PROXY_ARGS)
@@ -172,6 +177,9 @@ class X2goProxy(threading.Thread):
#p.terminate()
+ def _update_local_proxy_socket(self, port):
+ pass
+
def start_proxy(self):
"""\
Start the thread runner and wait for the proxy to come up.
@@ -217,6 +225,10 @@ class X2goNX3Proxy(X2goProxy):
"errors=%s/%s" % (self.session_info.local_container, self.session_log, ),
]
+ def _update_local_proxy_socket(self, port):
+ for idx, a in enumerate(self.PROXY_ARGS):
+ if a.startswith('port='):
+ self.PROXY_ARGS[idx] = port
def start_proxy(self):
self.logger('starting local NX3 proxy...', loglevel=log.loglevel_INFO)
diff --git a/x2go/session.py b/x2go/session.py
index 8d42f0f..f03f8fc 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -1082,7 +1082,7 @@ class X2goSession(paramiko.SSHClient):
return self.ok()
else:
- raise X2goSessionException('This X2go session instance is not associated to any server-side X2go session.')
+ raise x2go_exceptions.X2goSessionException('This X2go session instance is not associated to any server-side X2go session.')
def suspend(self, session_name=None):
"""\
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