aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-02-12 17:07:44 +0000
committerJustin Clarke Casey2009-02-12 17:07:44 +0000
commit31ca3a8d4d53fc82a3b4cb62ad4edaebc4111302 (patch)
tree89a086e5dcdc1cb026b9a9fe2d9d914babaa65a0 /OpenSim/Region
parent* Added XEngine tests and gathered other ScriptEngine (diff)
downloadopensim-SC-31ca3a8d4d53fc82a3b4cb62ad4edaebc4111302.zip
opensim-SC-31ca3a8d4d53fc82a3b4cb62ad4edaebc4111302.tar.gz
opensim-SC-31ca3a8d4d53fc82a3b4cb62ad4edaebc4111302.tar.bz2
opensim-SC-31ca3a8d4d53fc82a3b4cb62ad4edaebc4111302.tar.xz
* refactor: Move RequestInventoryForUser() from service to CachedUserInfo
* This simplifies callers in most cases - CachedUserInfo is already handling the rest of the fetch inventory work anyway
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
2 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index e366c79..847d32d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -472,7 +472,7 @@ namespace OpenSim.Region.Framework.Scenes
472 if (recipientUserInfo != null) 472 if (recipientUserInfo != null)
473 { 473 {
474 if (!recipientUserInfo.HasReceivedInventory) 474 if (!recipientUserInfo.HasReceivedInventory)
475 CommsManager.UserProfileCacheService.RequestInventoryForUser(recipient); 475 recipientUserInfo.FetchInventory();
476 476
477 // Insert a copy of the item into the recipient 477 // Insert a copy of the item into the recipient
478 InventoryItemBase itemCopy = new InventoryItemBase(); 478 InventoryItemBase itemCopy = new InventoryItemBase();
@@ -1202,7 +1202,8 @@ namespace OpenSim.Region.Framework.Scenes
1202 avatarId); 1202 avatarId);
1203 } 1203 }
1204 if (!profile.HasReceivedInventory) 1204 if (!profile.HasReceivedInventory)
1205 CommsManager.UserProfileCacheService.RequestInventoryForUser(avatarId); 1205 profile.FetchInventory();
1206
1206 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId); 1207 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId);
1207 1208
1208 if (agentItem == null) 1209 if (agentItem == null)
@@ -1841,8 +1842,7 @@ namespace OpenSim.Region.Framework.Scenes
1841 // Async inventory requests will queue, but they will never 1842 // Async inventory requests will queue, but they will never
1842 // execute unless inventory is actually fetched 1843 // execute unless inventory is actually fetched
1843 // 1844 //
1844 CommsManager.UserProfileCacheService.RequestInventoryForUser( 1845 userInfo.FetchInventory();
1845 userInfo.UserProfile.ID);
1846 } 1846 }
1847 1847
1848 if (userInfo != null) 1848 if (userInfo != null)
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0ed35af..2dd305a 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -847,7 +847,13 @@ namespace OpenSim.Region.Framework.Scenes
847 //SendAnimPack(); 847 //SendAnimPack();
848 848
849 m_scene.SwapRootAgentCount(false); 849 m_scene.SwapRootAgentCount(false);
850 m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid); 850
851 CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(m_uuid);
852 if (userInfo != null)
853 userInfo.FetchInventory();
854 else
855 m_log.ErrorFormat("[SCENE]: Could not find user info for {0} when making it a root agent", m_uuid);
856
851 //m_scene.CapsModule.AddCapsHandler(m_uuid); 857 //m_scene.CapsModule.AddCapsHandler(m_uuid);
852 858
853 // On the next prim update, all objects will be sent 859 // On the next prim update, all objects will be sent
@@ -2504,8 +2510,9 @@ namespace OpenSim.Region.Framework.Scenes
2504 } 2510 }
2505 else 2511 else
2506 { 2512 {
2507 // Restore the user structures that we needed to delete before asking the receiving region to complete the crossing 2513 // Restore the user structures that we needed to delete before asking the receiving region
2508 m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID); 2514 // to complete the crossing
2515 userInfo.FetchInventory();
2509 m_scene.CapsModule.AddCapsHandler(UUID); 2516 m_scene.CapsModule.AddCapsHandler(UUID);
2510 } 2517 }
2511 } 2518 }