aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
authorDiva Canto2010-01-01 21:12:46 -0800
committerDiva Canto2010-01-01 21:12:46 -0800
commit8a9677a5319793ff630d0761e204ae8961f375aa (patch)
tree0b92d2c9258383df59866945ebad7ba8479563d0 /OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
parentForgotten modules in prior commit. (diff)
downloadopensim-SC-8a9677a5319793ff630d0761e204ae8961f375aa.zip
opensim-SC-8a9677a5319793ff630d0761e204ae8961f375aa.tar.gz
opensim-SC-8a9677a5319793ff630d0761e204ae8961f375aa.tar.bz2
opensim-SC-8a9677a5319793ff630d0761e204ae8961f375aa.tar.xz
The Library Service is now working. UserProfileCacheService.LibraryRoot is obsolete. Didn't delete it yet to avoid merge conflicts later -- want to stay out of core as much as possible.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-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