aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
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
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 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs33
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
3 files changed, 35 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 2599456..6ba40df 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -1576,7 +1576,8 @@ namespace OpenSim.Region.ClientStack
1576 } 1576 }
1577 1577
1578 /// <summary> 1578 /// <summary>
1579 /// 1579 /// Send an alert message to the client. On the Linden client (tested 1.19.1.4), this pops up a brief duration
1580 /// blue information box in the bottom right hand corner.
1580 /// </summary> 1581 /// </summary>
1581 /// <param name="message"></param> 1582 /// <param name="message"></param>
1582 public void SendAlertMessage(string message) 1583 public void SendAlertMessage(string message)
@@ -1587,10 +1588,12 @@ namespace OpenSim.Region.ClientStack
1587 } 1588 }
1588 1589
1589 /// <summary> 1590 /// <summary>
1590 /// 1591 /// Send an agent alert message to the client.
1591 /// </summary> 1592 /// </summary>
1592 /// <param name="message"></param> 1593 /// <param name="message"></param>
1593 /// <param name="modal"></param> 1594 /// <param name="modal">On the linden client, if this true then it displays a one button text box placed in the
1595 /// middle of the window. If false, the message is displayed in a brief duration blue information box (as for
1596 /// the AlertMessage packet).</param>
1594 public void SendAgentAlertMessage(string message, bool modal) 1597 public void SendAgentAlertMessage(string message, bool modal)
1595 { 1598 {
1596 AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); 1599 AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage);
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