Fixes a side effect of the #583 solution only showing up in certain connection timing combinations related to which protocols were supported in a given client. The portal<->server handhshake exchanged the session info an extra round depending on the internal timing of the connection. Also fixed a handshake bug in the MXP initialization.
This commit is contained in:
parent
a5b4ddd1e9
commit
3eb347a076
4 changed files with 6 additions and 4 deletions
|
|
@ -51,6 +51,7 @@ class Mxp(object):
|
||||||
Client does not support MXP.
|
Client does not support MXP.
|
||||||
"""
|
"""
|
||||||
self.protocol.protocol_flags["MXP"] = False
|
self.protocol.protocol_flags["MXP"] = False
|
||||||
|
self.protocol.handshake_done()
|
||||||
|
|
||||||
def do_mxp(self, option):
|
def do_mxp(self, option):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -64,10 +64,11 @@ class PortalSessionHandler(SessionHandler):
|
||||||
# only use if session already has sessid (i.e. has already connected)
|
# only use if session already has sessid (i.e. has already connected)
|
||||||
sessdata = session.get_sync_data()
|
sessdata = session.get_sync_data()
|
||||||
if self.portal.amp_protocol:
|
if self.portal.amp_protocol:
|
||||||
# we remove sessdata that could already have changed on the
|
# we only send sessdata that should not have changed
|
||||||
# server level
|
# at the server level at this point
|
||||||
sessdata = dict((key, val) for key, val in sessdata.items() if key in ("protocol_key",
|
sessdata = dict((key, val) for key, val in sessdata.items() if key in ("protocol_key",
|
||||||
"address",
|
"address",
|
||||||
|
"sessid",
|
||||||
"suid",
|
"suid",
|
||||||
"conn_time",
|
"conn_time",
|
||||||
"protocol_flags",
|
"protocol_flags",
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ class Session(object):
|
||||||
and loads it into the correct properties of the session.
|
and loads it into the correct properties of the session.
|
||||||
"""
|
"""
|
||||||
for propname, value in sessdata.items():
|
for propname, value in sessdata.items():
|
||||||
self.__dict__[propname] = value
|
setattr(self, propname, value)
|
||||||
|
|
||||||
def at_sync(self):
|
def at_sync(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@ class ServerSessionHandler(SessionHandler):
|
||||||
|
|
||||||
session.logged_in = True
|
session.logged_in = True
|
||||||
# sync the portal to the session
|
# sync the portal to the session
|
||||||
sessdata = session.get_sync_data()
|
sessdata = {"logged_in": True}
|
||||||
if not testmode:
|
if not testmode:
|
||||||
self.server.amp_protocol.call_remote_PortalAdmin(session.sessid,
|
self.server.amp_protocol.call_remote_PortalAdmin(session.sessid,
|
||||||
operation=SLOGIN,
|
operation=SLOGIN,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue