From a58152bd2af64493e655d6f559bc366c38433187 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 9 Mar 2012 12:59:24 -0800 Subject: More on inventory transfer hold ups: - Added an inventory cache for caching root and system folders - Synchronized the remote inventory connector, so that all the remote inventory calls are serialized This will not make much difference in the hold ups. We'd have to move the FireAndForget high up to AddInventoryItem, but that opens up a can of worms regarding the notification of the recipient... the recipient would be notified of the offer before the items are effectively in his inventory, which could lead to surprises. --- OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index a662abb..39e983b 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs @@ -48,6 +48,8 @@ namespace OpenSim.Services.Connectors private string m_ServerURI = String.Empty; + private object m_Lock = new object(); + public XInventoryServicesConnector() { } @@ -514,9 +516,11 @@ namespace OpenSim.Services.Connectors { sendData["METHOD"] = method; - string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/xinventory", - ServerUtils.BuildQueryString(sendData)); + string reply = string.Empty; + lock (m_Lock) + reply = SynchronousRestFormsRequester.MakeRequest("POST", + m_ServerURI + "/xinventory", + ServerUtils.BuildQueryString(sendData)); Dictionary replyData = ServerUtils.ParseXmlResponse( reply); -- cgit v1.1