aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs34
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs13
3 files changed, 38 insertions, 21 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 89ce4ae..f322af3 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -573,7 +573,9 @@ namespace OpenSim.Region.Framework.Scenes
573 "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}", 573 "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}",
574 remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName); 574 remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName);
575 575
576 InventoryItemBase item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(oldItemID); 576 InventoryItemBase item = null;
577 if (LibraryService != null && LibraryService.LibraryRootFolder != null)
578 item = LibraryService.LibraryRootFolder.FindItem(oldItemID);
577 579
578 if (item == null) 580 if (item == null)
579 { 581 {
@@ -1211,9 +1213,9 @@ namespace OpenSim.Region.Framework.Scenes
1211 item = InventoryService.GetItem(item); 1213 item = InventoryService.GetItem(item);
1212 1214
1213 // Try library 1215 // Try library
1214 if (null == item) 1216 if (null == item && LibraryService != null && LibraryService.LibraryRootFolder != null)
1215 { 1217 {
1216 item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); 1218 item = LibraryService.LibraryRootFolder.FindItem(itemID);
1217 } 1219 }
1218 1220
1219 if (item != null) 1221 if (item != null)
@@ -1280,9 +1282,9 @@ namespace OpenSim.Region.Framework.Scenes
1280 1282
1281 // Try library 1283 // Try library
1282 // XXX clumsy, possibly should be one call 1284 // XXX clumsy, possibly should be one call
1283 if (null == item) 1285 if (null == item && LibraryService != null && LibraryService.LibraryRootFolder != null)
1284 { 1286 {
1285 item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); 1287 item = LibraryService.LibraryRootFolder.FindItem(itemID);
1286 } 1288 }
1287 1289
1288 if (item != null) 1290 if (item != null)
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
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 418cfbf..ae189b5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -240,6 +240,19 @@ namespace OpenSim.Region.Framework.Scenes
240 } 240 }
241 } 241 }
242 242
243 protected ILibraryService m_LibraryService;
244
245 public ILibraryService LibraryService
246 {
247 get
248 {
249 if (m_LibraryService == null)
250 m_LibraryService = RequestModuleInterface<ILibraryService>();
251
252 return m_LibraryService;
253 }
254 }
255
243 protected IXMLRPC m_xmlrpcModule; 256 protected IXMLRPC m_xmlrpcModule;
244 protected IWorldComm m_worldCommModule; 257 protected IWorldComm m_worldCommModule;
245 protected IAvatarFactory m_AvatarFactory; 258 protected IAvatarFactory m_AvatarFactory;