Commit 63b4c0b1 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Accept Ask Transaction Information from a ServerConnection as well.

git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@193 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent b3ae7dbf
...@@ -226,19 +226,16 @@ class OperationEventHandler(StorageEventHandler): ...@@ -226,19 +226,16 @@ class OperationEventHandler(StorageEventHandler):
self.handleUnexpectedPacket(conn, packet) self.handleUnexpectedPacket(conn, packet)
def handleAskTransactionInformation(self, conn, packet, tid): def handleAskTransactionInformation(self, conn, packet, tid):
if isinstance(conn, ClientConnection): app = self.app
self.handleUnexpectedPacket(conn, packet) t = app.dm.getTransaction(tid)
else:
app = self.app
t = app.dm.getTransaction(tid)
p = Packet() p = Packet()
if t is None: if t is None:
p.tidNotFound(packet.getId(), '%s does not exist' % dump(tid)) p.tidNotFound(packet.getId(), '%s does not exist' % dump(tid))
else: else:
p.answerTransactionInformation(packet.getId(), tid, p.answerTransactionInformation(packet.getId(), tid,
t[1], t[2], t[3], t[0]) t[1], t[2], t[3], t[0])
conn.addPacket(p) conn.addPacket(p)
def handleAskObjectPresent(self, conn, packet, oid, tid): def handleAskObjectPresent(self, conn, packet, oid, tid):
self.handleUnexpectedPacket(conn, packet) self.handleUnexpectedPacket(conn, packet)
......
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