From 7ac7f79f88f51504680a24f1621115c595492f62 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 11 Apr 2008 18:46:54 +0000 Subject: * Eliminate a class of errors where an inventory request could be made before the region had completely received the inventory for the user. * A much larger race condition where the inventory request could be made before the region gets any data at all will also be fixed in the near future. * This change also fixes a regression from two patches ago where items stopped appearing in standalone inventory --- OpenSim/Region/Communications/Local/LocalInventoryService.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Communications/Local') diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index e81a39f..dafd637 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs @@ -39,13 +39,18 @@ namespace OpenSim.Region.Communications.Local /// public class LocalInventoryService : InventoryServiceBase { + private static readonly log4net.ILog m_log + = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) { + m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Requesting inventory for user {0}", userID); + List skeletonFolders = GetInventorySkeleton(userID); InventoryFolderImpl rootFolder = null; - ICollection folders = new List(); - ICollection items = new List(); + List folders = new List(); + List items = new List(); // Need to retrieve the root folder on the first pass foreach (InventoryFolderBase folder in skeletonFolders) @@ -54,6 +59,7 @@ namespace OpenSim.Region.Communications.Local { rootFolder = new InventoryFolderImpl(folder); folders.Add(rootFolder); + items.AddRange(RequestFolderItems(rootFolder.ID)); } } @@ -64,6 +70,7 @@ namespace OpenSim.Region.Communications.Local if (folder.ID != rootFolder.ID) { folders.Add(new InventoryFolderImpl(folder)); + items.AddRange(RequestFolderItems(folder.ID)); } } } -- cgit v1.1