aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/InventoryServiceBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/InventoryServiceBase.cs')
-rw-r--r--OpenSim/Framework/Communications/InventoryServiceBase.cs24
1 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index a48988d..897aa9a 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications
36{ 36{
37 public abstract class InventoryServiceBase : IInventoryServices 37 public abstract class InventoryServiceBase : IInventoryServices
38 { 38 {
39 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
40
39 protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>(); 41 protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>();
40 //protected IAssetServer m_assetServer; 42 //protected IAssetServer m_assetServer;
41 43
@@ -52,7 +54,7 @@ namespace OpenSim.Framework.Communications
52 { 54 {
53 if (!String.IsNullOrEmpty(FileName)) 55 if (!String.IsNullOrEmpty(FileName))
54 { 56 {
55 MainLog.Instance.Verbose("AGENTINVENTORY", "Inventorystorage: Attempting to load " + FileName); 57 m_log.Info("[AGENTINVENTORY]: Inventorystorage: Attempting to load " + FileName);
56 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 58 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
57 59
58 foreach (Type pluginType in pluginAssembly.GetTypes()) 60 foreach (Type pluginType in pluginAssembly.GetTypes())
@@ -67,7 +69,7 @@ namespace OpenSim.Framework.Communications
67 (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 69 (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
68 plug.Initialise(); 70 plug.Initialise();
69 m_plugins.Add(plug.getName(), plug); 71 m_plugins.Add(plug.getName(), plug);
70 MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface"); 72 m_log.Info("[AGENTINVENTORY]: Added IInventoryData Interface");
71 } 73 }
72 } 74 }
73 } 75 }
@@ -95,9 +97,8 @@ namespace OpenSim.Framework.Communications
95 rootFolder = plugin.Value.getUserRootFolder(userID); 97 rootFolder = plugin.Value.getUserRootFolder(userID);
96 if (rootFolder != null) 98 if (rootFolder != null)
97 { 99 {
98 MainLog.Instance.Verbose( 100 m_log.Info(
99 "INVENTORY", 101 "[INVENTORY]: Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
100 "Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
101 102
102 inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); 103 inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
103 inventoryList.Insert(0, rootFolder); 104 inventoryList.Insert(0, rootFolder);
@@ -105,8 +106,8 @@ namespace OpenSim.Framework.Communications
105 } 106 }
106 } 107 }
107 108
108 MainLog.Instance.Warn( 109 m_log.Warn(
109 "INVENTORY", "Could not find a root folder belonging to user with ID " + userID); 110 "[INVENTORY]: Could not find a root folder belonging to user with ID " + userID);
110 111
111 return inventoryList; 112 return inventoryList;
112 } 113 }
@@ -226,10 +227,10 @@ namespace OpenSim.Framework.Communications
226 227
227 if (null != existingRootFolder) 228 if (null != existingRootFolder)
228 { 229 {
229 MainLog.Instance.Error( 230 m_log.Error(
230 "AGENTINVENTORY", 231 String.Format("[AGENTINVENTORY]: " +
231 "Did not create a new inventory for user {0} since they already have " 232 "Did not create a new inventory for user {0} since they already have "
232 + "a root inventory folder with id {1}", user, existingRootFolder); 233 + "a root inventory folder with id {1}", user, existingRootFolder));
233 } 234 }
234 else 235 else
235 { 236 {
@@ -251,6 +252,7 @@ namespace OpenSim.Framework.Communications
251 public virtual void CreateNewInventorySet(LLUUID user) 252 public virtual void CreateNewInventorySet(LLUUID user)
252 { 253 {
253 InventoryFolderBase folder = new InventoryFolderBase(); 254 InventoryFolderBase folder = new InventoryFolderBase();
255
254 folder.parentID = LLUUID.Zero; 256 folder.parentID = LLUUID.Zero;
255 folder.agentID = user; 257 folder.agentID = user;
256 folder.folderID = LLUUID.Random(); 258 folder.folderID = LLUUID.Random();