aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs34
1 files changed, 18 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 47fbeb4..022d79d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -424,7 +424,7 @@ namespace OpenSim.Region.Framework.Scenes
424 /// <param name="ownerID"></param> 424 /// <param name="ownerID"></param>
425 public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID) 425 public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID)
426 { 426 {
427 if (ownerID == CommsManager.UserProfileCacheService.LibraryRoot.Owner) 427 if (LibraryService != null && LibraryService.LibraryRootFolder != null && ownerID == LibraryService.LibraryRootFolder.Owner)
428 { 428 {
429 //m_log.Debug("request info for library item"); 429 //m_log.Debug("request info for library item");
430 return; 430 return;
@@ -458,13 +458,14 @@ namespace OpenSim.Region.Framework.Scenes
458 // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. 458 // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
459 // can be handled transparently). 459 // can be handled transparently).
460 InventoryFolderImpl fold = null; 460 InventoryFolderImpl fold = null;
461 if ((fold = CommsManager.UserProfileCacheService.LibraryRoot.FindFolder(folderID)) != null) 461 if (LibraryService != null && LibraryService.LibraryRootFolder != null)
462 { 462 if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
463 remoteClient.SendInventoryFolderDetails( 463 {
464 fold.Owner, folderID, fold.RequestListOfItems(), 464 remoteClient.SendInventoryFolderDetails(
465 fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); 465 fold.Owner, folderID, fold.RequestListOfItems(),
466 return; 466 fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems);
467 } 467 return;
468 }
468 469
469 // We're going to send the reply async, because there may be 470 // We're going to send the reply async, because there may be
470 // an enormous quantity of packets -- basically the entire inventory! 471 // an enormous quantity of packets -- basically the entire inventory!
@@ -512,15 +513,16 @@ namespace OpenSim.Region.Framework.Scenes
512 // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. 513 // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
513 // can be handled transparently). 514 // can be handled transparently).
514 InventoryFolderImpl fold; 515 InventoryFolderImpl fold;
515 if ((fold = CommsManager.UserProfileCacheService.LibraryRoot.FindFolder(folderID)) != null) 516 if (LibraryService != null && LibraryService.LibraryRootFolder != null)
516 { 517 if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
517 version = 0; 518 {
518 InventoryCollection ret = new InventoryCollection(); 519 version = 0;
519 ret.Folders = new List<InventoryFolderBase>(); 520 InventoryCollection ret = new InventoryCollection();
520 ret.Items = fold.RequestListOfItems(); 521 ret.Folders = new List<InventoryFolderBase>();
522 ret.Items = fold.RequestListOfItems();
521 523
522 return ret; 524 return ret;
523 } 525 }
524 526
525 InventoryCollection contents = new InventoryCollection(); 527 InventoryCollection contents = new InventoryCollection();
526 528