aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs67
1 files changed, 18 insertions, 49 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 92b08e5..176e75e 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -250,15 +250,6 @@ namespace OpenSim.Framework.Communications.Cache
250 // XXX We're not handling sortOrder yet! 250 // XXX We're not handling sortOrder yet!
251 251
252 InventoryFolderImpl fold = null; 252 InventoryFolderImpl fold = null;
253 if (folderID == libraryRoot.ID)
254 {
255 remoteClient.SendInventoryFolderDetails(
256 libraryRoot.Owner, libraryRoot.ID, libraryRoot.RequestListOfItems(),
257 libraryRoot.RequestListOfFolders(), fetchFolders, fetchItems);
258
259 return;
260 }
261
262 if ((fold = libraryRoot.FindFolder(folderID)) != null) 253 if ((fold = libraryRoot.FindFolder(folderID)) != null)
263 { 254 {
264 remoteClient.SendInventoryFolderDetails( 255 remoteClient.SendInventoryFolderDetails(
@@ -293,33 +284,23 @@ namespace OpenSim.Framework.Communications.Cache
293 284
294 if (userProfile.HasInventory) 285 if (userProfile.HasInventory)
295 { 286 {
296 if (userProfile.RootFolder.ID == folderID) 287 if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null)
297 { 288 {
298// m_log.DebugFormat( 289// m_log.DebugFormat(
299// "[AGENT INVENTORY]: Found root folder {0} for client {1}", 290// "[AGENT INVENTORY]: Found folder {0} for client {1}",
300// folderID, remoteClient.AgentId); 291// folderID, remoteClient.AgentId);
301 292
302 remoteClient.SendInventoryFolderDetails( 293 remoteClient.SendInventoryFolderDetails(
303 remoteClient.AgentId, folderID, userProfile.RootFolder.RequestListOfItems(), 294 remoteClient.AgentId, folderID, fold.RequestListOfItems(),
304 userProfile.RootFolder.RequestListOfFolders(), 295 fold.RequestListOfFolders(), fetchFolders, fetchItems);
305 fetchFolders, fetchItems);
306 296
307 return; 297 return;
308 } 298 }
309 else 299 else
310 { 300 {
311 if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null) 301 m_log.WarnFormat(
312 { 302 "[AGENT INVENTORY]: Could not find folder {0} requested by user {1} {2}",
313// m_log.DebugFormat( 303 folderID, remoteClient.Name, remoteClient.AgentId);
314// "[AGENT INVENTORY]: Found folder {0} for client {1}",
315// folderID, remoteClient.AgentId);
316
317 remoteClient.SendInventoryFolderDetails(
318 remoteClient.AgentId, folderID, fold.RequestListOfItems(),
319 fold.RequestListOfFolders(), fetchFolders, fetchItems);
320
321 return;
322 }
323 } 304 }
324 } 305 }
325 else 306 else
@@ -363,12 +344,7 @@ namespace OpenSim.Framework.Communications.Cache
363 344
364 // XXX We're not handling sortOrder yet! 345 // XXX We're not handling sortOrder yet!
365 346
366 InventoryFolderImpl fold = null; 347 InventoryFolderImpl fold;
367 if (folderID == libraryRoot.ID)
368 {
369 return libraryRoot.RequestListOfItems();
370 }
371
372 if ((fold = libraryRoot.FindFolder(folderID)) != null) 348 if ((fold = libraryRoot.FindFolder(folderID)) != null)
373 { 349 {
374 return fold.RequestListOfItems(); 350 return fold.RequestListOfItems();
@@ -404,17 +380,18 @@ namespace OpenSim.Framework.Communications.Cache
404 380
405 if (userProfile.HasInventory) 381 if (userProfile.HasInventory)
406 { 382 {
407 if (userProfile.RootFolder.ID == folderID) 383 if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null)
408 { 384 {
409 return userProfile.RootFolder.RequestListOfItems(); 385 return fold.RequestListOfItems();
410 } 386 }
411 else 387 else
412 { 388 {
413 if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null) 389 m_log.WarnFormat(
414 { 390 "[AGENT INVENTORY]: Could not find folder {0} requested by user {1}",
415 return fold.RequestListOfItems(); 391 folderID, agentID);
416 } 392
417 } 393 return null;
394 }
418 } 395 }
419 else 396 else
420 { 397 {
@@ -429,14 +406,6 @@ namespace OpenSim.Framework.Communications.Cache
429 406
430 return null; 407 return null;
431 } 408 }
432
433 // If we've reached this point then we couldn't find the folder, even though the client thinks
434 // it exists
435 m_log.ErrorFormat("[AGENT INVENTORY]: " +
436 "Could not find folder {0} for user {1}",
437 folderID, agentID.ToString());
438
439 return new List<InventoryItemBase>();
440 } 409 }
441 410
442 /// <summary> 411 /// <summary>