aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authordahlia2013-01-10 20:21:18 -0800
committerMelanie2013-01-13 13:43:59 +0000
commit2eb0d8b6176c223e915a2d22b1c9540156283943 (patch)
treefe3c6f5737084d1f834c8ee0b8de9bbe628042c6 /OpenSim/Region
parentMerge branch 'ubitwork' into avination (diff)
downloadopensim-SC-2eb0d8b6176c223e915a2d22b1c9540156283943.zip
opensim-SC-2eb0d8b6176c223e915a2d22b1c9540156283943.tar.gz
opensim-SC-2eb0d8b6176c223e915a2d22b1c9540156283943.tar.bz2
opensim-SC-2eb0d8b6176c223e915a2d22b1c9540156283943.tar.xz
add some sanity checking to HandleAgentRequestSit handler
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index d46adb8..0a865ab 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -6601,8 +6601,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6601 6601
6602 AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; 6602 AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit;
6603 if (handlerAgentRequestSit != null) 6603 if (handlerAgentRequestSit != null)
6604 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, 6604 if (!(agentRequestSit.AgentData == null
6605 agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); 6605 || agentRequestSit.TargetObject == null
6606 || agentRequestSit.TargetObject.TargetID == null
6607 || agentRequestSit.TargetObject.Offset == null))
6608 {
6609 var sp = m_scene.GetScenePresence(agentRequestSit.AgentData.AgentID);
6610 if (sp == null || sp.ParentID != 0) // ignore packet if agent is already sitting
6611 return true;
6612
6613 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
6614 agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
6615 }
6606 } 6616 }
6607 return true; 6617 return true;
6608 } 6618 }