aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-14 18:43:23 +0000
committerJustin Clarke Casey2008-04-14 18:43:23 +0000
commitb7ae8701ce6881991fbacf28cdbb0d09f220f6ec (patch)
tree39247c37f31b9ad774a47e660eb9d314ef4c4582 /OpenSim/Region/Environment
parent* Fixed a few warnings. (diff)
downloadopensim-SC_OLD-b7ae8701ce6881991fbacf28cdbb0d09f220f6ec.zip
opensim-SC_OLD-b7ae8701ce6881991fbacf28cdbb0d09f220f6ec.tar.gz
opensim-SC_OLD-b7ae8701ce6881991fbacf28cdbb0d09f220f6ec.tar.bz2
opensim-SC_OLD-b7ae8701ce6881991fbacf28cdbb0d09f220f6ec.tar.xz
* Working towards notifying the client if the inventory service has failed, rather than simply returning 0 items.
* This is very early support which would only be triggered in a rather unlikely case (if the user server correctly received an inventory skeleton, but later on failed to return the whole inventory in a timely manner. Also, this only applies to the 1.19.1.4 client onwards * Code cleanup and support for other failure cases (failure of inventory caching on region crossing, failure to actually add a folder/item, etc, should follow.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs33
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
2 files changed, 29 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index ef98599..0838387 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -618,6 +618,28 @@ namespace OpenSim.Region.Environment.Scenes
618 618
619 return result; 619 return result;
620 } 620 }
621
622 /// <summary>
623 /// Get the controlling client for the given avatar, if there is one.
624 ///
625 /// FIXME: The only user of the method right now is Caps.cs, in order to resolve a client API since it can't
626 /// use the ScenePresence. This could be better solved in a number of ways - we could establish an
627 /// OpenSim.Framework.IScenePresence, or move the caps code into a region package (which might be the more
628 /// suitable solution).
629 /// </summary>
630 /// <param name="agentId"></param>
631 /// <returns>null if either the avatar wasn't in the scene, or they do not have a controlling client</returns>
632 public IClientAPI GetControllingClient(LLUUID agentId)
633 {
634 ScenePresence presence = GetScenePresence(agentId);
635
636 if (presence != null)
637 {
638 return presence.ControllingClient;
639 }
640
641 return null;
642 }
621 643
622 /// <summary> 644 /// <summary>
623 /// Request a filtered list of m_scenePresences in this World 645 /// Request a filtered list of m_scenePresences in this World
@@ -640,16 +662,17 @@ namespace OpenSim.Region.Environment.Scenes
640 } 662 }
641 663
642 /// <summary> 664 /// <summary>
643 /// Request a Avatar by UUID 665 /// Request a scene presence by UUID
644 /// </summary> 666 /// </summary>
645 /// <param name="avatarID"></param> 667 /// <param name="avatarID"></param>
646 /// <returns></returns> 668 /// <returns>null if the agent was not found</returns>
647 public ScenePresence GetScenePresence(LLUUID avatarID) 669 public ScenePresence GetScenePresence(LLUUID agentID)
648 { 670 {
649 if (ScenePresences.ContainsKey(avatarID)) 671 if (ScenePresences.ContainsKey(agentID))
650 { 672 {
651 return ScenePresences[avatarID]; 673 return ScenePresences[agentID];
652 } 674 }
675
653 return null; 676 return null;
654 } 677 }
655 678
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 410120f..b93367c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1884,7 +1884,7 @@ namespace OpenSim.Region.Environment.Scenes
1884 cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset; 1884 cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset;
1885 cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; 1885 cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset;
1886 cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; 1886 cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS;
1887 1887 cap.GetClient = m_innerScene.GetControllingClient;
1888 m_capsHandlers[agentId] = cap; 1888 m_capsHandlers[agentId] = cap;
1889 } 1889 }
1890 1890