Commit 11522cd5 authored by Aurel's avatar Aurel

fix many typo and wrong method definition


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@59 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 424ddc48
......@@ -16,7 +16,7 @@ from protocol import ERROR, REQUEST_NODE_IDENTIFICATION, ACCEPT_NODE_IDENTIFICAT
ASK_NEW_OIDS, ANSWER_NEW_OIDS, ASK_STORE_OBJECT, ANSWER_STORE_OBJECT, \
ABORT_TRANSACTION, ASK_STORE_TRANSACTION, ANSWER_STORE_TRANSACTION, \
ASK_OBJECT_BY_OID, ANSWER_OBJECT_BY_OID, ASK_TIDS, ANSWER_TIDS, ASK_TRANSACTION_INFORMATION, \
ANSWER_TRANSACTION_INFORMATION, ASK_OBJETC_HISTORY, ANSWER_OBJETC_HISTORY, \
ANSWER_TRANSACTION_INFORMATION, ASK_OBJECT_HISTORY, ANSWER_OBJECT_HISTORY, \
NOT_READY_CODE, OID_NOT_FOUND_CODE, SERIAL_NOT_FOUND_CODE, TID_NOT_FOUND_CODE, \
PROTOCOL_ERROR_CODE, TIMEOUT_ERROR_CODE, BROKEN_NODE_DISALLOWED_CODE, \
INTERNAL_ERROR_CODE
......@@ -232,22 +232,22 @@ class EventHandler(object):
serial_end, compression, checksum, data):
self.handleUnexpectedPacket(conn, packet)
def handleAskTIDs(self, first, last, spec):
def handleAskTIDs(self, conn, packet, first, last, spec):
self.handleUnexpectedPacket(conn, packet)
def handleAnswerTIDs(self, tid_list):
self.handleUnexpectedPacket(conn, packet)
def handleAnswerTIDs(self, conn, packet, tid_list):
self.handleUnexpectedPacket(conn, conn, packet, packet)
def handleAskTransactionInformation(self, tid):
def handleAskTransactionInformation(self, conn, packet, tid):
self.handleUnexpectedPacket(conn, packet)
def handleAnswerTransactionInformation(self, tid, user, desc, oid_list):
def handleAnswerTransactionInformation(self, conn, packet, tid, user, desc, oid_list):
self.handleUnexpectedPacket(conn, packet)
def handleAskObjectHistory(self, oid, length):
def handleAskObjectHistory(self, conn, packet, oid, length):
self.handleUnexpectedPacket(conn, packet)
def handleAnswerObjectHistory(self, oid, history_list):
def handleAnswerObjectHistory(self, conn, packet, oid, history_list):
self.handleUnexpectedPacket(conn, packet)
# Error packet handlers.
......@@ -305,8 +305,8 @@ class EventHandler(object):
d[NOTIFY_INFORMATION_LOCKED] = self.handleNotifyInformationLocked
d[INVALIDATE_OBJECTS] = self.handleInvalidateObjects
d[UNLOCK_INFORMATION] = self.handleUnlockInformation
d[ASK_NEW_OIDS] = self.handleAskNewOids
d[ANSWER_NEW_OIDS] = self.handleAnswerNewOids
d[ASK_NEW_OIDS] = self.handleAskNewOIDs
d[ANSWER_NEW_OIDS] = self.handleAnswerNewOIDs
d[ASK_STORE_OBJECT] = self.handleAskStoreObject
d[ANSWER_STORE_OBJECT] = self.handleAnswerStoreObject
d[ABORT_TRANSACTION] = self.handleAbortTransaction
......
......@@ -152,7 +152,7 @@ ASK_TIDS = 0x001d
ANSWER_TIDS = 0x801d
# Ask information about a transaction. PM, C -> S.
ASK_TRANSACTION_INFORMATION = 0xOO1e
ASK_TRANSACTION_INFORMATION = 0x001e
# Answer information (user, description) about a transaction. S -> C, PM.
ANSWER_TRANSACTION_INFORMATION = 0x801e
......@@ -517,7 +517,7 @@ class Packet(object):
user_len = len(user)
desc_len = len(desc)
ext_len = len(ext)
body = [pack('!8sLHHH' tid, len(oid_list), user_len, desc_len, ext_len)]
body = [pack('!8sLHHH', tid, len(oid_list), user_len, desc_len, ext_len)]
body.append(user)
body.append(desc)
body.append(ext)
......@@ -1062,7 +1062,7 @@ class Packet(object):
except:
raise ProtocolError(self, 'invalid answer transaction information')
return tid, user, desc
decode_table[ANSWER_TRANSACTION_INFORMATION] = _decodeAnswerTransationInformation
decode_table[ANSWER_TRANSACTION_INFORMATION] = _decodeAnswerTransactionInformation
def _decodeAskObjectHistory(self):
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment