aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/InventoryService/XInventoryService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/InventoryService/XInventoryService.cs')
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs21
1 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index f63ab16..84306e7 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -157,6 +157,8 @@ namespace OpenSim.Services.InventoryService
157 157
158 protected virtual XInventoryFolder[] GetSystemFolders(UUID principalID) 158 protected virtual XInventoryFolder[] GetSystemFolders(UUID principalID)
159 { 159 {
160// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting system folders for {0}", principalID);
161
160 XInventoryFolder[] allFolders = m_Database.GetFolders( 162 XInventoryFolder[] allFolders = m_Database.GetFolders(
161 new string[] { "agentID" }, 163 new string[] { "agentID" },
162 new string[] { principalID.ToString() }); 164 new string[] { principalID.ToString() });
@@ -170,6 +172,9 @@ namespace OpenSim.Services.InventoryService
170 return false; 172 return false;
171 }); 173 });
172 174
175// m_log.DebugFormat(
176// "[XINVENTORY SERVICE]: Found {0} system folders for {1}", sysFolders.Length, principalID);
177
173 return sysFolders; 178 return sysFolders;
174 } 179 }
175 180
@@ -186,7 +191,7 @@ namespace OpenSim.Services.InventoryService
186 191
187 foreach (XInventoryFolder x in allFolders) 192 foreach (XInventoryFolder x in allFolders)
188 { 193 {
189 //m_log.DebugFormat("[XINVENTORY]: Adding folder {0} to skeleton", x.folderName); 194 //m_log.DebugFormat("[XINVENTORY SERVICE]: Adding folder {0} to skeleton", x.folderName);
190 folders.Add(ConvertToOpenSim(x)); 195 folders.Add(ConvertToOpenSim(x));
191 } 196 }
192 197
@@ -214,12 +219,21 @@ namespace OpenSim.Services.InventoryService
214 219
215 public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) 220 public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)
216 { 221 {
222// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID);
223
217 XInventoryFolder[] folders = m_Database.GetFolders( 224 XInventoryFolder[] folders = m_Database.GetFolders(
218 new string[] { "agentID", "type"}, 225 new string[] { "agentID", "type"},
219 new string[] { principalID.ToString(), ((int)type).ToString() }); 226 new string[] { principalID.ToString(), ((int)type).ToString() });
220 227
221 if (folders.Length == 0) 228 if (folders.Length == 0)
229 {
230// m_log.WarnFormat("[XINVENTORY SERVICE]: Found no folder for type {0} for user {1}", type, principalID);
222 return null; 231 return null;
232 }
233
234// m_log.DebugFormat(
235// "[XINVENTORY SERVICE]: Found folder {0} {1} for type {2} for user {3}",
236// folders[0].folderName, folders[0].folderID, type, principalID);
223 237
224 return ConvertToOpenSim(folders[0]); 238 return ConvertToOpenSim(folders[0]);
225 } 239 }
@@ -230,7 +244,7 @@ namespace OpenSim.Services.InventoryService
230 // connector. So we disregard the principal and look 244 // connector. So we disregard the principal and look
231 // by ID. 245 // by ID.
232 // 246 //
233 m_log.DebugFormat("[XINVENTORY]: Fetch contents for folder {0}", folderID.ToString()); 247 m_log.DebugFormat("[XINVENTORY SERVICE]: Fetch contents for folder {0}", folderID.ToString());
234 InventoryCollection inventory = new InventoryCollection(); 248 InventoryCollection inventory = new InventoryCollection();
235 inventory.UserID = principalID; 249 inventory.UserID = principalID;
236 inventory.Folders = new List<InventoryFolderBase>(); 250 inventory.Folders = new List<InventoryFolderBase>();
@@ -349,6 +363,9 @@ namespace OpenSim.Services.InventoryService
349 363
350 public virtual bool AddItem(InventoryItemBase item) 364 public virtual bool AddItem(InventoryItemBase item)
351 { 365 {
366// m_log.DebugFormat(
367// "[XINVENTORY SERVICE]: Adding item {0} to folder {1} for {2}", item.ID, item.Folder, item.Owner);
368
352 return m_Database.StoreItem(ConvertFromOpenSim(item)); 369 return m_Database.StoreItem(ConvertFromOpenSim(item));
353 } 370 }
354 371