diff options
author | Sean Dague | 2007-12-08 14:27:12 +0000 |
---|---|---|
committer | Sean Dague | 2007-12-08 14:27:12 +0000 |
commit | 0855066968e30a9965088c14234b2bc93daf0481 (patch) | |
tree | 9f2a0c9a520af4bfa53fd3aa1ae651f0130bd5bb /OpenSim/Framework/Communications | |
parent | set svn:eol-style (diff) | |
download | opensim-SC-0855066968e30a9965088c14234b2bc93daf0481.zip opensim-SC-0855066968e30a9965088c14234b2bc93daf0481.tar.gz opensim-SC-0855066968e30a9965088c14234b2bc93daf0481.tar.bz2 opensim-SC-0855066968e30a9965088c14234b2bc93daf0481.tar.xz |
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)
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/InventoryServiceBase.cs | 15 |
1 files changed, 12 insertions, 3 deletions
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 | |||
82 | /// <returns></returns> | 82 | /// <returns></returns> |
83 | public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID) | 83 | public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID) |
84 | { | 84 | { |
85 | List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>(); | 85 | List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>(); |
86 | InventoryFolderBase rootFolder = null; | ||
87 | |||
86 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 88 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
87 | { | 89 | { |
88 | InventoryFolderBase rootFolder = plugin.Value.getUserRootFolder(userID); | 90 | rootFolder = plugin.Value.getUserRootFolder(userID); |
89 | if (rootFolder != null) | 91 | if (rootFolder != null) |
90 | { | 92 | { |
91 | inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); | 93 | inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); |
@@ -93,6 +95,13 @@ namespace OpenSim.Framework.Communications | |||
93 | return inventoryList; | 95 | return inventoryList; |
94 | } | 96 | } |
95 | } | 97 | } |
98 | |||
99 | if (null == rootFolder) | ||
100 | { | ||
101 | MainLog.Instance.Warn( | ||
102 | "INVENTORY", "Could not find a root folder belonging to user with ID " + userID); | ||
103 | } | ||
104 | |||
96 | return inventoryList; | 105 | return inventoryList; |
97 | } | 106 | } |
98 | 107 | ||
@@ -235,4 +244,4 @@ namespace OpenSim.Framework.Communications | |||
235 | public abstract void AddNewInventoryItem(LLUUID userID, InventoryItemBase item); | 244 | public abstract void AddNewInventoryItem(LLUUID userID, InventoryItemBase item); |
236 | public abstract void DeleteInventoryItem(LLUUID userID, InventoryItemBase item); | 245 | public abstract void DeleteInventoryItem(LLUUID userID, InventoryItemBase item); |
237 | } | 246 | } |
238 | } \ No newline at end of file | 247 | } |