From 802a969267da9ed2780ea66c736c3d531e336dfa Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 12 Feb 2010 21:32:03 +0000 Subject: Fix http://opensimulator.org/mantis/view.php?id=4224 This resolves the problem where eyes and hair would turn white on standalone configurations When a client receives body part information, for some insane reason or other it always ends up uploading this back to the server and then immediately re-requesting it. This should have been okay since we stored that asset in cache. However, the standalone asset service connector was not checking this cache properly, so every time the client made the request for the asset it has just loaded it would get a big fat null back in the face, causing it to make clothes and hair white. This bug did not affect grids since they use a different service connector. --- .../Inventory/LocalInventoryServiceConnector.cs | 25 ++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 66d11dd..3883dc6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs @@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory IConfig inventoryConfig = source.Configs["InventoryService"]; if (inventoryConfig == null) { - m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); + m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: InventoryService missing from OpenSim.ini"); return; } @@ -81,18 +81,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory if (serviceDll == String.Empty) { - m_log.Error("[INVENTORY CONNECTOR]: No LocalServiceModule named in section InventoryService"); + m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: No LocalServiceModule named in section InventoryService"); return; } Object[] args = new Object[] { source }; - m_log.DebugFormat("[INVENTORY CONNECTOR]: Service dll = {0}", serviceDll); + m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Service dll = {0}", serviceDll); m_InventoryService = ServerUtils.LoadPlugin(serviceDll, args); if (m_InventoryService == null) { - m_log.Error("[INVENTORY CONNECTOR]: Can't load inventory service"); + m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: Can't load inventory service"); //return; throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } @@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory Init(source); m_Enabled = true; - m_log.Info("[INVENTORY CONNECTOR]: Local inventory connector enabled"); + m_log.Info("[LOCAL INVENTORY SERVICES CONNECTOR]: Local inventory connector enabled"); } } } @@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory } // m_log.DebugFormat( -// "[INVENTORY CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName); +// "[LOCAL INVENTORY SERVICES CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName); scene.RegisterModuleInterface(this); m_cache.AddRegion(scene); @@ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return; m_log.InfoFormat( - "[INVENTORY CONNECTOR]: Enabled local invnetory for region {0}", scene.RegionInfo.RegionName); + "[LOCAL INVENTORY SERVICES CONNECTOR]: Enabled local inventory for region {0}", scene.RegionInfo.RegionName); } #region IInventoryService @@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return folders; } } - m_log.WarnFormat("[INVENTORY CONNECTOR]: System folders for {0} not found", userID); + m_log.WarnFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: System folders for {0} not found", userID); return new Dictionary(); } @@ -312,7 +312,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public override InventoryItemBase GetItem(InventoryItemBase item) { - return m_InventoryService.GetItem(item); +// m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); + + item = m_InventoryService.GetItem(item); + + if (null == item) + m_log.ErrorFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}"); + + return item; } public override InventoryFolderBase GetFolder(InventoryFolderBase folder) -- cgit v1.1