From 0855066968e30a9965088c14234b2bc93daf0481 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Sat, 8 Dec 2007 14:27:12 +0000
Subject: This patch fixes mantis 105. Basically, it stops the index exception
when no root folder is found and it makes the user server wait longer for the
inventory server to do its work.
From Justin Casey (IBM)
---
OpenSim/Framework/Communications/InventoryServiceBase.cs | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index 091d829..e86eaac 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -82,10 +82,12 @@ namespace OpenSim.Framework.Communications
///
public List RequestFirstLevelFolders(LLUUID userID)
{
- List inventoryList = new List();
+ List inventoryList = new List();
+ InventoryFolderBase rootFolder = null;
+
foreach (KeyValuePair plugin in m_plugins)
{
- InventoryFolderBase rootFolder = plugin.Value.getUserRootFolder(userID);
+ rootFolder = plugin.Value.getUserRootFolder(userID);
if (rootFolder != null)
{
inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
@@ -93,6 +95,13 @@ namespace OpenSim.Framework.Communications
return inventoryList;
}
}
+
+ if (null == rootFolder)
+ {
+ MainLog.Instance.Warn(
+ "INVENTORY", "Could not find a root folder belonging to user with ID " + userID);
+ }
+
return inventoryList;
}
@@ -235,4 +244,4 @@ namespace OpenSim.Framework.Communications
public abstract void AddNewInventoryItem(LLUUID userID, InventoryItemBase item);
public abstract void DeleteInventoryItem(LLUUID userID, InventoryItemBase item);
}
-}
\ No newline at end of file
+}
--
cgit v1.1