From 409670e8e885a65885e6cafd2aac055eaab958ff Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Sun, 16 May 2010 17:46:44 +0000
Subject: [PATCH] Pass current TID to AskHasLock.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2117 71dcc9de-d417-0410-9af5-da40c76e7ee4
---
 neo/client/app.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/neo/client/app.py b/neo/client/app.py
index dd9dd1da..5e461d4f 100644
--- a/neo/client/app.py
+++ b/neo/client/app.py
@@ -581,7 +581,7 @@ class Application(object):
         checksum = makeChecksum(compressed_data)
         p = Packets.AskStoreObject(oid, serial, compression,
                  checksum, compressed_data, self.local_var.tid)
-        on_timeout = OnTimeout(self.onStoreTimeout, oid)
+        on_timeout = OnTimeout(self.onStoreTimeout, self.local_var.tid, oid)
         # Store object in tmp cache
         self.local_var.data_dict[oid] = data
         # Store data on each node
@@ -600,10 +600,10 @@ class Application(object):
         self._waitAnyMessage(False)
         return None
 
-    def onStoreTimeout(self, conn, msg_id, oid):
+    def onStoreTimeout(self, conn, msg_id, tid, oid):
         # Ask the storage if someone locks the object.
         # Shorten timeout to react earlier to an unresponding storage.
-        conn.ask(Packets.AskHasLock(oid), timeout=5)
+        conn.ask(Packets.AskHasLock(tid, oid), timeout=5)
         # Stop expecting the timed-out store request.
         self.dispatcher.forget(conn, msg_id)
         return True
-- 
2.30.9