aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/InventoryServiceBase.cs27
1 files changed, 12 insertions, 15 deletions
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index 0797a84..534383a 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Framework.Communications
65 if (typeInterface != null) 65 if (typeInterface != null)
66 { 66 {
67 IInventoryData plug = 67 IInventoryData plug =
68 (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 68 (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
69 plug.Initialise(); 69 plug.Initialise();
70 m_plugins.Add(plug.getName(), plug); 70 m_plugins.Add(plug.getName(), plug);
71 MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface"); 71 MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface");
@@ -74,44 +74,41 @@ namespace OpenSim.Framework.Communications
74 } 74 }
75 } 75 }
76 } 76 }
77 77
78 public List<InventoryFolderBase> RequestFirstLevelFolders(Guid rawUserID) 78 public List<InventoryFolderBase> RequestFirstLevelFolders(Guid rawUserID)
79 { 79 {
80 LLUUID userID = new LLUUID(rawUserID); 80 LLUUID userID = new LLUUID(rawUserID);
81 return RequestFirstLevelFolders(userID); 81 return RequestFirstLevelFolders(userID);
82 } 82 }
83 83
84 /// <summary> 84 /// <summary>
85 /// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree) 85 /// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree)
86 /// </summary> 86 /// </summary>
87 /// <param name="userID"></param> 87 /// <param name="userID"></param>
88 /// <returns></returns> 88 /// <returns></returns>
89 public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID) 89 public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
90 { 90 {
91 List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>(); 91 List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
92 InventoryFolderBase rootFolder = null; 92 InventoryFolderBase rootFolder = null;
93 93
94 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) 94 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
95 { 95 {
96 rootFolder = plugin.Value.getUserRootFolder(userID); 96 rootFolder = plugin.Value.getUserRootFolder(userID);
97 if (rootFolder != null) 97 if (rootFolder != null)
98 { 98 {
99 MainLog.Instance.Verbose( 99 MainLog.Instance.Verbose(
100 "INVENTORY", 100 "INVENTORY",
101 "Found root folder for user with ID " + userID + ". Retrieving inventory contents."); 101 "Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
102 102
103 inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); 103 inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
104 inventoryList.Insert(0, rootFolder); 104 inventoryList.Insert(0, rootFolder);
105 return inventoryList; 105 return inventoryList;
106 } 106 }
107 } 107 }
108 108
109 if (null == rootFolder) 109 MainLog.Instance.Warn(
110 { 110 "INVENTORY", "Could not find a root folder belonging to user with ID " + userID);
111 MainLog.Instance.Warn( 111
112 "INVENTORY", "Could not find a root folder belonging to user with ID " + userID);
113 }
114
115 return inventoryList; 112 return inventoryList;
116 } 113 }
117 114