X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/632ab6dde450c5e7b35f8817816c9d04294bd230..2b4e872eda2ebc5724caba7a33d05c964ae2751e:/code/main.py diff --git a/code/main.py b/code/main.py index c8444e8..24254c7 100755 --- a/code/main.py +++ b/code/main.py @@ -255,6 +255,10 @@ def vnc(username, state, path, fields): token = {'data': pickled_data, 'digest': m.digest()} token = cPickle.dumps(token) token = base64.urlsafe_b64encode(token) + if controls.listHost(machine) == 'sx-blade-2.mit.edu': + port = 10004 + else: + port = 10003 status = controls.statusInfo(machine) has_vnc = hasVnc(status) @@ -264,6 +268,7 @@ def vnc(username, state, path, fields): has_vnc=has_vnc, machine=machine, hostname=state.environ.get('SERVER_NAME', 'localhost'), + port=port, authtoken=token) return templates.vnc(searchList=[d])