aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/InventoryService
diff options
context:
space:
mode:
authormeta72010-08-30 11:42:17 -0700
committermeta72010-08-30 11:42:17 -0700
commit35d6181b78525df995cf2dc5f8bb4f102f3c0aad (patch)
tree725b6fcda44f24f578cde7851aac869c59c0af82 /OpenSim/Services/InventoryService
parentKick the user from the region in the circumstance that the TP home failed - O... (diff)
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC-35d6181b78525df995cf2dc5f8bb4f102f3c0aad.zip
opensim-SC-35d6181b78525df995cf2dc5f8bb4f102f3c0aad.tar.gz
opensim-SC-35d6181b78525df995cf2dc5f8bb4f102f3c0aad.tar.bz2
opensim-SC-35d6181b78525df995cf2dc5f8bb4f102f3c0aad.tar.xz
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Services/InventoryService')
-rw-r--r--OpenSim/Services/InventoryService/InventoryService.cs9
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs21
2 files changed, 27 insertions, 3 deletions
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs
index fbcd663..86bca79 100644
--- a/OpenSim/Services/InventoryService/InventoryService.cs
+++ b/OpenSim/Services/InventoryService/InventoryService.cs
@@ -268,15 +268,22 @@ namespace OpenSim.Services.InventoryService
268 268
269 public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) 269 public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
270 { 270 {
271// m_log.DebugFormat("[INVENTORY SERVICE]: Looking for folder type {0} for user {1}", type, userID);
272
271 InventoryFolderBase root = m_Database.getUserRootFolder(userID); 273 InventoryFolderBase root = m_Database.getUserRootFolder(userID);
272 if (root != null) 274 if (root != null)
273 { 275 {
274 List<InventoryFolderBase> folders = RequestSubFolders(root.ID); 276 List<InventoryFolderBase> folders = RequestSubFolders(root.ID);
275 277
276 foreach (InventoryFolderBase folder in folders) 278 foreach (InventoryFolderBase folder in folders)
277 { 279 {
278 if (folder.Type == (short)type) 280 if (folder.Type == (short)type)
281 {
282// m_log.DebugFormat(
283// "[INVENTORY SERVICE]: Found folder {0} type {1}", folder.Name, (AssetType)folder.Type);
284
279 return folder; 285 return folder;
286 }
280 } 287 }
281 } 288 }
282 289
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