[X2Go-Commits] [x2gobroker] 02/03: Fix setting the remote agent's SSH port if the host option is of style "<hostname> (<ip-address>:<port>)".

git-admin at x2go.org git-admin at x2go.org
Thu Nov 6 05:59:34 CET 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2gobroker.

commit 6f9a657188a3eb727c9513da6dc03aa8cc4205b7
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Nov 6 05:57:17 2014 +0100

    Fix setting the remote agent's SSH port if the host option is of style "<hostname> (<ip-address>:<port>)".
---
 debian/changelog                  |    2 ++
 x2gobroker/brokers/base_broker.py |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2c1aeee..a99ddf0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -190,6 +190,8 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low
     - Get several issues around select_session fixed via tests in the
       broker's backend base.py.
     - Add tests for broker agent queries.
+    - Fix setting the remote agent's SSH port if the host option
+      is of style "<hostname> (<ip-address>:<port>)".
   * debian/control:
     + Provide separate bin:package for SSH brokerage: x2gobroker-ssh.
     + Replace LDAP support with session brokerage support in LONG_DESCRIPTION.
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 93f86b3..3007351 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -968,10 +968,10 @@ class X2GoBroker(object):
 
                 remote_agent_server = server_list[-1]
                 remote_agent_port = profile[u'sshport']
+                if profile.has_key('sshport={ras}'.format(ras=remote_agent_server)):
+                    remote_agent_port = profile["sshport={ras}".format(ras=remote_agent_server)]
                 if profile.has_key('host={ras}'.format(ras=remote_agent_server)):
                     remote_agent_server = profile["host={ras}".format(ras=remote_agent_server)]
-                if profile.has_key('sshport={ras}'.format(ras=remote_agent_port)):
-                    remote_agent_port = profile["host={rap}".format(ras=remote_agent_port)]
 
                 remote_agent = {u'hostname': remote_agent_server, u'port': remote_agent_port, }
 

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git


More information about the x2go-commits mailing list