fix handleUnexpectedMsgType for non OTP server

This commit is contained in:
Joe Shochet 2005-01-21 23:09:24 +00:00
parent 9538bc5a39
commit 4e03d03391

View File

@ -591,6 +591,11 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
self.send(obj.dclass.clientFormatGenerate(obj, id, zone, [])) self.send(obj.dclass.clientFormatGenerate(obj, id, zone, []))
def handleUnexpectedMsgType(self, msgType, di): def handleUnexpectedMsgType(self, msgType, di):
if msgType == CLIENT_GO_GET_LOST:
self.handleGoGetLost(di)
elif msgType == CLIENT_HEARTBEAT:
self.handleServerHeartbeat(di)
elif wantOtpServer:
if msgType == CLIENT_CREATE_OBJECT_REQUIRED: if msgType == CLIENT_CREATE_OBJECT_REQUIRED:
self.handleGenerateWithRequired(di) self.handleGenerateWithRequired(di)
elif msgType == CLIENT_CREATE_OBJECT_REQUIRED_OTHER: elif msgType == CLIENT_CREATE_OBJECT_REQUIRED_OTHER:
@ -601,19 +606,15 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
self.handleDisable(di) self.handleDisable(di)
elif msgType == CLIENT_OBJECT_DELETE_RESP: elif msgType == CLIENT_OBJECT_DELETE_RESP:
self.handleDelete(di) self.handleDelete(di)
elif msgType == CLIENT_GO_GET_LOST:
self.handleGoGetLost(di)
elif msgType == CLIENT_HEARTBEAT:
self.handleServerHeartbeat(di)
elif msgType == CLIENT_SYSTEM_MESSAGE: elif msgType == CLIENT_SYSTEM_MESSAGE:
self.handleSystemMessage(di) self.handleSystemMessage(di)
elif wantOtpServer and msgType == CLIENT_CREATE_OBJECT_REQUIRED: elif msgType == CLIENT_CREATE_OBJECT_REQUIRED:
self.handleGenerateWithRequired(di) self.handleGenerateWithRequired(di)
elif wantOtpServer and msgType == CLIENT_CREATE_OBJECT_REQUIRED_OTHER: elif msgType == CLIENT_CREATE_OBJECT_REQUIRED_OTHER:
self.handleGenerateWithRequiredOther(di) self.handleGenerateWithRequiredOther(di)
elif wantOtpServer and msgType == CLIENT_DONE_SET_ZONE_RESP: elif msgType == CLIENT_DONE_SET_ZONE_RESP:
self.handleSetZoneDone() self.handleSetZoneDone()
elif wantOtpServer and msgType == CLIENT_OBJECT_LOCATION: elif msgType == CLIENT_OBJECT_LOCATION:
self.handleObjectLocation(di) self.handleObjectLocation(di)
else: else:
currentLoginState = self.loginFSM.getCurrentState() currentLoginState = self.loginFSM.getCurrentState()