From 7821cca2f5a7c31a41446656f218fdaf450969c0 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 11 Jun 2008 14:02:16 +0000 Subject: Mantis#1514. Thank you kindly, Boscata for an InventoryServer patch to allow the InventoryServer to work with MSSQL.. --- OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 2 +- OpenSim/Framework/Communications/IInventoryServices.cs | 7 +++++++ OpenSim/Framework/Communications/InventoryServiceBase.cs | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index b98cec7..d010bd5 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs @@ -379,7 +379,7 @@ namespace OpenSim.Framework.Communications.Cache baseFolder.Type = (short) type; baseFolder.Version = RootFolder.Version; - m_commsManager.InventoryService.AddFolder(baseFolder); + m_commsManager.InventoryService.UpdateFolder(baseFolder); } else { diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index f7a8857..8dc09bc 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs @@ -58,6 +58,13 @@ namespace OpenSim.Framework.Communications bool AddFolder(InventoryFolderBase folder); /// + /// Update a folder in the user's inventory + /// + /// + /// true if the folder was successfully updated + bool UpdateFolder(InventoryFolderBase folder); + + /// /// Move an inventory folder to a new location /// /// A folder containing the details of the new location diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index dffeed3..89ccf93 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -199,6 +199,21 @@ namespace OpenSim.Framework.Communications } // See IInventoryServices + public bool UpdateFolder(InventoryFolderBase folder) + { + m_log.DebugFormat( + "[AGENT INVENTORY]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); + + foreach (KeyValuePair plugin in m_plugins) + { + plugin.Value.updateInventoryFolder(folder); + } + + // FIXME: Should return false on failure + return true; + } + + // See IInventoryServices public bool MoveFolder(InventoryFolderBase folder) { m_log.DebugFormat( -- cgit v1.1