aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs269
1 files changed, 269 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 5593e16..f735aa7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -4419,6 +4419,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4419 return; 4419 return;
4420 } 4420 }
4421 4421
4422 const bool m_checkPackets = true;
4423
4422 // Main packet processing conditional 4424 // Main packet processing conditional
4423 switch (Pack.Type) 4425 switch (Pack.Type)
4424 { 4426 {
@@ -4427,6 +4429,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4427 case PacketType.AvatarPropertiesRequest: 4429 case PacketType.AvatarPropertiesRequest:
4428 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; 4430 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
4429 4431
4432 #region Packet Session and User Check
4433 if (m_checkPackets)
4434 {
4435 if (avatarProperties.AgentData.SessionID != SessionId ||
4436 avatarProperties.AgentData.AgentID != AgentId)
4437 break;
4438 }
4439 #endregion
4440
4430 handlerRequestAvatarProperties = OnRequestAvatarProperties; 4441 handlerRequestAvatarProperties = OnRequestAvatarProperties;
4431 if (handlerRequestAvatarProperties != null) 4442 if (handlerRequestAvatarProperties != null)
4432 { 4443 {
@@ -4438,6 +4449,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4438 case PacketType.ChatFromViewer: 4449 case PacketType.ChatFromViewer:
4439 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; 4450 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
4440 4451
4452 #region Packet Session and User Check
4453 if (m_checkPackets)
4454 {
4455 if (inchatpack.AgentData.SessionID != SessionId ||
4456 inchatpack.AgentData.AgentID != AgentId)
4457 break;
4458 }
4459 #endregion
4460
4441 string fromName = String.Empty; //ClientAvatar.firstname + " " + ClientAvatar.lastname; 4461 string fromName = String.Empty; //ClientAvatar.firstname + " " + ClientAvatar.lastname;
4442 byte[] message = inchatpack.ChatData.Message; 4462 byte[] message = inchatpack.ChatData.Message;
4443 byte type = inchatpack.ChatData.Type; 4463 byte type = inchatpack.ChatData.Type;
@@ -4468,6 +4488,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4468 case PacketType.AvatarPropertiesUpdate: 4488 case PacketType.AvatarPropertiesUpdate:
4469 AvatarPropertiesUpdatePacket Packet = (AvatarPropertiesUpdatePacket)Pack; 4489 AvatarPropertiesUpdatePacket Packet = (AvatarPropertiesUpdatePacket)Pack;
4470 4490
4491 #region Packet Session and User Check
4492 if (m_checkPackets)
4493 {
4494 if (Packet.AgentData.SessionID != SessionId ||
4495 Packet.AgentData.AgentID != AgentId)
4496 break;
4497 }
4498 #endregion
4499
4471 handlerUpdateAvatarProperties = OnUpdateAvatarProperties; 4500 handlerUpdateAvatarProperties = OnUpdateAvatarProperties;
4472 if (handlerUpdateAvatarProperties != null) 4501 if (handlerUpdateAvatarProperties != null)
4473 { 4502 {
@@ -4485,6 +4514,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4485 4514
4486 case PacketType.ScriptDialogReply: 4515 case PacketType.ScriptDialogReply:
4487 ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; 4516 ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack;
4517
4518 #region Packet Session and User Check
4519 if (m_checkPackets)
4520 {
4521 if (rdialog.AgentData.SessionID != SessionId ||
4522 rdialog.AgentData.AgentID != AgentId)
4523 break;
4524 }
4525 #endregion
4526
4488 int ch = rdialog.Data.ChatChannel; 4527 int ch = rdialog.Data.ChatChannel;
4489 byte[] msg = rdialog.Data.ButtonLabel; 4528 byte[] msg = rdialog.Data.ButtonLabel;
4490 if (OnChatFromClient != null) 4529 if (OnChatFromClient != null)
@@ -4506,6 +4545,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4506 4545
4507 case PacketType.ImprovedInstantMessage: 4546 case PacketType.ImprovedInstantMessage:
4508 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; 4547 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack;
4548
4549 #region Packet Session and User Check
4550 if (m_checkPackets)
4551 {
4552 if (msgpack.AgentData.SessionID != SessionId ||
4553 msgpack.AgentData.AgentID != AgentId)
4554 break;
4555 }
4556 #endregion
4557
4509 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); 4558 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName);
4510 string IMmessage = Utils.BytesToString(msgpack.MessageBlock.Message); 4559 string IMmessage = Utils.BytesToString(msgpack.MessageBlock.Message);
4511 handlerInstantMessage = OnInstantMessage; 4560 handlerInstantMessage = OnInstantMessage;
@@ -4531,6 +4580,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4531 case PacketType.AcceptFriendship: 4580 case PacketType.AcceptFriendship:
4532 AcceptFriendshipPacket afriendpack = (AcceptFriendshipPacket)Pack; 4581 AcceptFriendshipPacket afriendpack = (AcceptFriendshipPacket)Pack;
4533 4582
4583 #region Packet Session and User Check
4584 if (m_checkPackets)
4585 {
4586 if (afriendpack.AgentData.SessionID != SessionId ||
4587 afriendpack.AgentData.AgentID != AgentId)
4588 break;
4589 }
4590 #endregion
4591
4534 // My guess is this is the folder to stick the calling card into 4592 // My guess is this is the folder to stick the calling card into
4535 List<UUID> callingCardFolders = new List<UUID>(); 4593 List<UUID> callingCardFolders = new List<UUID>();
4536 4594
@@ -4552,6 +4610,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4552 case PacketType.DeclineFriendship: 4610 case PacketType.DeclineFriendship:
4553 DeclineFriendshipPacket dfriendpack = (DeclineFriendshipPacket)Pack; 4611 DeclineFriendshipPacket dfriendpack = (DeclineFriendshipPacket)Pack;
4554 4612
4613 #region Packet Session and User Check
4614 if (m_checkPackets)
4615 {
4616 if (dfriendpack.AgentData.SessionID != SessionId ||
4617 dfriendpack.AgentData.AgentID != AgentId)
4618 break;
4619 }
4620 #endregion
4621
4555 if (OnDenyFriendRequest != null) 4622 if (OnDenyFriendRequest != null)
4556 { 4623 {
4557 OnDenyFriendRequest(this, 4624 OnDenyFriendRequest(this,
@@ -4563,6 +4630,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4563 4630
4564 case PacketType.TerminateFriendship: 4631 case PacketType.TerminateFriendship:
4565 TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack; 4632 TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack;
4633
4634 #region Packet Session and User Check
4635 if (m_checkPackets)
4636 {
4637 if (tfriendpack.AgentData.SessionID != SessionId ||
4638 tfriendpack.AgentData.AgentID != AgentId)
4639 break;
4640 }
4641 #endregion
4642
4566 UUID listOwnerAgentID = tfriendpack.AgentData.AgentID; 4643 UUID listOwnerAgentID = tfriendpack.AgentData.AgentID;
4567 UUID exFriendID = tfriendpack.ExBlock.OtherID; 4644 UUID exFriendID = tfriendpack.ExBlock.OtherID;
4568 4645
@@ -4576,6 +4653,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4576 case PacketType.RezObject: 4653 case PacketType.RezObject:
4577 RezObjectPacket rezPacket = (RezObjectPacket)Pack; 4654 RezObjectPacket rezPacket = (RezObjectPacket)Pack;
4578 4655
4656 #region Packet Session and User Check
4657 if (m_checkPackets)
4658 {
4659 if (rezPacket.AgentData.SessionID != SessionId ||
4660 rezPacket.AgentData.AgentID != AgentId)
4661 break;
4662 }
4663 #endregion
4664
4579 handlerRezObject = OnRezObject; 4665 handlerRezObject = OnRezObject;
4580 if (handlerRezObject != null) 4666 if (handlerRezObject != null)
4581 { 4667 {
@@ -4589,6 +4675,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4589 4675
4590 case PacketType.DeRezObject: 4676 case PacketType.DeRezObject:
4591 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack; 4677 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack;
4678
4679 #region Packet Session and User Check
4680 if (m_checkPackets)
4681 {
4682 if (DeRezPacket.AgentData.SessionID != SessionId ||
4683 DeRezPacket.AgentData.AgentID != AgentId)
4684 break;
4685 }
4686 #endregion
4687
4592 handlerDeRezObject = OnDeRezObject; 4688 handlerDeRezObject = OnDeRezObject;
4593 if (handlerDeRezObject != null) 4689 if (handlerDeRezObject != null)
4594 { 4690 {
@@ -4607,6 +4703,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4607 4703
4608 case PacketType.ModifyLand: 4704 case PacketType.ModifyLand:
4609 ModifyLandPacket modify = (ModifyLandPacket)Pack; 4705 ModifyLandPacket modify = (ModifyLandPacket)Pack;
4706
4707 #region Packet Session and User Check
4708 if (m_checkPackets)
4709 {
4710 if (modify.AgentData.SessionID != SessionId ||
4711 modify.AgentData.AgentID != AgentId)
4712 break;
4713 }
4714
4715 #endregion
4610 //m_log.Info("[LAND]: LAND:" + modify.ToString()); 4716 //m_log.Info("[LAND]: LAND:" + modify.ToString());
4611 if (modify.ParcelData.Length > 0) 4717 if (modify.ParcelData.Length > 0)
4612 { 4718 {
@@ -4660,6 +4766,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4660 case PacketType.AgentSetAppearance: 4766 case PacketType.AgentSetAppearance:
4661 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; 4767 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
4662 4768
4769 #region Packet Session and User Check
4770 if (m_checkPackets)
4771 {
4772 if (appear.AgentData.SessionID != SessionId ||
4773 appear.AgentData.AgentID != AgentId)
4774 break;
4775 }
4776 #endregion
4777
4663 handlerSetAppearance = OnSetAppearance; 4778 handlerSetAppearance = OnSetAppearance;
4664 if (handlerSetAppearance != null) 4779 if (handlerSetAppearance != null)
4665 { 4780 {
@@ -4690,6 +4805,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4690 if (OnAvatarNowWearing != null) 4805 if (OnAvatarNowWearing != null)
4691 { 4806 {
4692 AgentIsNowWearingPacket nowWearing = (AgentIsNowWearingPacket)Pack; 4807 AgentIsNowWearingPacket nowWearing = (AgentIsNowWearingPacket)Pack;
4808
4809 #region Packet Session and User Check
4810 if (m_checkPackets)
4811 {
4812 if (nowWearing.AgentData.SessionID != SessionId ||
4813 nowWearing.AgentData.AgentID != AgentId)
4814 break;
4815 }
4816 #endregion
4817
4693 AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); 4818 AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
4694 for (int i = 0; i < nowWearing.WearableData.Length; i++) 4819 for (int i = 0; i < nowWearing.WearableData.Length; i++)
4695 { 4820 {
@@ -4712,6 +4837,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4712 if (handlerRezSingleAttachment != null) 4837 if (handlerRezSingleAttachment != null)
4713 { 4838 {
4714 RezSingleAttachmentFromInvPacket rez = (RezSingleAttachmentFromInvPacket)Pack; 4839 RezSingleAttachmentFromInvPacket rez = (RezSingleAttachmentFromInvPacket)Pack;
4840
4841 #region Packet Session and User Check
4842 if (m_checkPackets)
4843 {
4844 if (rez.AgentData.SessionID != SessionId ||
4845 rez.AgentData.AgentID != AgentId)
4846 break;
4847 }
4848 #endregion
4849
4715 handlerRezSingleAttachment(this, rez.ObjectData.ItemID, 4850 handlerRezSingleAttachment(this, rez.ObjectData.ItemID,
4716 rez.ObjectData.AttachmentPt); 4851 rez.ObjectData.AttachmentPt);
4717 } 4852 }
@@ -4735,6 +4870,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4735 { 4870 {
4736 DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; 4871 DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack;
4737 4872
4873 #region Packet Session and User Check
4874 // UNSUPPORTED ON THIS PACKET
4875 #endregion
4876
4738 UUID itemID = detachtoInv.ObjectData.ItemID; 4877 UUID itemID = detachtoInv.ObjectData.ItemID;
4739 // UUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; 4878 // UUID ATTACH_agentID = detachtoInv.ObjectData.AgentID;
4740 4879
@@ -4747,6 +4886,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4747 { 4886 {
4748 ObjectAttachPacket att = (ObjectAttachPacket)Pack; 4887 ObjectAttachPacket att = (ObjectAttachPacket)Pack;
4749 4888
4889 #region Packet Session and User Check
4890 if (m_checkPackets)
4891 {
4892 if (att.AgentData.SessionID != SessionId ||
4893 att.AgentData.AgentID != AgentId)
4894 break;
4895 }
4896 #endregion
4897
4750 handlerObjectAttach = OnObjectAttach; 4898 handlerObjectAttach = OnObjectAttach;
4751 4899
4752 if (handlerObjectAttach != null) 4900 if (handlerObjectAttach != null)
@@ -4761,6 +4909,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4761 4909
4762 case PacketType.ObjectDetach: 4910 case PacketType.ObjectDetach:
4763 ObjectDetachPacket dett = (ObjectDetachPacket)Pack; 4911 ObjectDetachPacket dett = (ObjectDetachPacket)Pack;
4912
4913 #region Packet Session and User Check
4914 if (m_checkPackets)
4915 {
4916 if (dett.AgentData.SessionID != SessionId ||
4917 dett.AgentData.AgentID != AgentId)
4918 break;
4919 }
4920 #endregion
4921
4764 for (int j = 0; j < dett.ObjectData.Length; j++) 4922 for (int j = 0; j < dett.ObjectData.Length; j++)
4765 { 4923 {
4766 uint obj = dett.ObjectData[j].ObjectLocalID; 4924 uint obj = dett.ObjectData[j].ObjectLocalID;
@@ -4775,6 +4933,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4775 4933
4776 case PacketType.ObjectDrop: 4934 case PacketType.ObjectDrop:
4777 ObjectDropPacket dropp = (ObjectDropPacket)Pack; 4935 ObjectDropPacket dropp = (ObjectDropPacket)Pack;
4936
4937 #region Packet Session and User Check
4938 if (m_checkPackets)
4939 {
4940 if (dropp.AgentData.SessionID != SessionId ||
4941 dropp.AgentData.AgentID != AgentId)
4942 break;
4943 }
4944 #endregion
4945
4778 for (int j = 0; j < dropp.ObjectData.Length; j++) 4946 for (int j = 0; j < dropp.ObjectData.Length; j++)
4779 { 4947 {
4780 uint obj = dropp.ObjectData[j].ObjectLocalID; 4948 uint obj = dropp.ObjectData[j].ObjectLocalID;
@@ -4789,6 +4957,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4789 case PacketType.SetAlwaysRun: 4957 case PacketType.SetAlwaysRun:
4790 SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack; 4958 SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack;
4791 4959
4960 #region Packet Session and User Check
4961 if (m_checkPackets)
4962 {
4963 if (run.AgentData.SessionID != SessionId ||
4964 run.AgentData.AgentID != AgentId)
4965 break;
4966 }
4967 #endregion
4968
4792 handlerSetAlwaysRun = OnSetAlwaysRun; 4969 handlerSetAlwaysRun = OnSetAlwaysRun;
4793 if (handlerSetAlwaysRun != null) 4970 if (handlerSetAlwaysRun != null)
4794 handlerSetAlwaysRun(this, run.AgentData.AlwaysRun); 4971 handlerSetAlwaysRun(this, run.AgentData.AlwaysRun);
@@ -4810,6 +4987,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4810 { 4987 {
4811 AgentUpdatePacket agenUpdate = (AgentUpdatePacket)Pack; 4988 AgentUpdatePacket agenUpdate = (AgentUpdatePacket)Pack;
4812 4989
4990 #region Packet Session and User Check
4991 if (m_checkPackets)
4992 {
4993 if (agenUpdate.AgentData.SessionID != SessionId ||
4994 agenUpdate.AgentData.AgentID != AgentId)
4995 break;
4996 }
4997 #endregion
4998
4813 AgentUpdatePacket.AgentDataBlock x = agenUpdate.AgentData; 4999 AgentUpdatePacket.AgentDataBlock x = agenUpdate.AgentData;
4814 AgentUpdateArgs arg = new AgentUpdateArgs(); 5000 AgentUpdateArgs arg = new AgentUpdateArgs();
4815 arg.AgentID = x.AgentID; 5001 arg.AgentID = x.AgentID;
@@ -4837,6 +5023,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4837 case PacketType.AgentAnimation: 5023 case PacketType.AgentAnimation:
4838 AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack; 5024 AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack;
4839 5025
5026 #region Packet Session and User Check
5027 if (m_checkPackets)
5028 {
5029 if (AgentAni.AgentData.SessionID != SessionId ||
5030 AgentAni.AgentData.AgentID != AgentId)
5031 break;
5032 }
5033 #endregion
5034
4840 handlerStartAnim = null; 5035 handlerStartAnim = null;
4841 handlerStopAnim = null; 5036 handlerStopAnim = null;
4842 5037
@@ -4866,6 +5061,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4866 { 5061 {
4867 AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack; 5062 AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack;
4868 5063
5064 #region Packet Session and User Check
5065 if (m_checkPackets)
5066 {
5067 if (agentRequestSit.AgentData.SessionID != SessionId ||
5068 agentRequestSit.AgentData.AgentID != AgentId)
5069 break;
5070 }
5071 #endregion
5072
4869 handlerAgentRequestSit = OnAgentRequestSit; 5073 handlerAgentRequestSit = OnAgentRequestSit;
4870 if (handlerAgentRequestSit != null) 5074 if (handlerAgentRequestSit != null)
4871 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, 5075 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
@@ -4878,6 +5082,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4878 { 5082 {
4879 AgentSitPacket agentSit = (AgentSitPacket)Pack; 5083 AgentSitPacket agentSit = (AgentSitPacket)Pack;
4880 5084
5085 #region Packet Session and User Check
5086 if (m_checkPackets)
5087 {
5088 if (agentSit.AgentData.SessionID != SessionId ||
5089 agentSit.AgentData.AgentID != AgentId)
5090 break;
5091 }
5092 #endregion
5093
4881 handlerAgentSit = OnAgentSit; 5094 handlerAgentSit = OnAgentSit;
4882 if (handlerAgentSit != null) 5095 if (handlerAgentSit != null)
4883 { 5096 {
@@ -4888,6 +5101,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4888 5101
4889 case PacketType.SoundTrigger: 5102 case PacketType.SoundTrigger:
4890 SoundTriggerPacket soundTriggerPacket = (SoundTriggerPacket)Pack; 5103 SoundTriggerPacket soundTriggerPacket = (SoundTriggerPacket)Pack;
5104
5105 #region Packet Session and User Check
5106 if (m_checkPackets)
5107 {
5108 // UNSUPPORTED ON THIS PACKET
5109 }
5110 #endregion
5111
4891 handlerSoundTrigger = OnSoundTrigger; 5112 handlerSoundTrigger = OnSoundTrigger;
4892 if (handlerSoundTrigger != null) 5113 if (handlerSoundTrigger != null)
4893 { 5114 {
@@ -4901,6 +5122,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4901 5122
4902 case PacketType.AvatarPickerRequest: 5123 case PacketType.AvatarPickerRequest:
4903 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; 5124 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack;
5125
5126 #region Packet Session and User Check
5127 if (m_checkPackets)
5128 {
5129 if (avRequestQuery.AgentData.SessionID != SessionId ||
5130 avRequestQuery.AgentData.AgentID != AgentId)
5131 break;
5132 }
5133 #endregion
5134
4904 AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData; 5135 AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData;
4905 AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data; 5136 AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data;
4906 //m_log.Debug("Agent Sends:" + Utils.BytesToString(querydata.Name)); 5137 //m_log.Debug("Agent Sends:" + Utils.BytesToString(querydata.Name));
@@ -4916,6 +5147,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4916 case PacketType.AgentDataUpdateRequest: 5147 case PacketType.AgentDataUpdateRequest:
4917 AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack; 5148 AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack;
4918 5149
5150 #region Packet Session and User Check
5151 if (m_checkPackets)
5152 {
5153 if (avRequestDataUpdatePacket.AgentData.SessionID != SessionId ||
5154 avRequestDataUpdatePacket.AgentData.AgentID != AgentId)
5155 break;
5156 }
5157 #endregion
5158
4919 handlerAgentDataUpdateRequest = OnAgentDataUpdateRequest; 5159 handlerAgentDataUpdateRequest = OnAgentDataUpdateRequest;
4920 5160
4921 if (handlerAgentDataUpdateRequest != null) 5161 if (handlerAgentDataUpdateRequest != null)
@@ -4939,6 +5179,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4939 5179
4940 case PacketType.UpdateUserInfo: 5180 case PacketType.UpdateUserInfo:
4941 UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack; 5181 UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack;
5182
5183 #region Packet Session and User Check
5184 if (m_checkPackets)
5185 {
5186 if (updateUserInfo.AgentData.SessionID != SessionId ||
5187 updateUserInfo.AgentData.AgentID != AgentId)
5188 break;
5189 }
5190 #endregion
5191
4942 handlerUpdateUserInfo = OnUpdateUserInfo; 5192 handlerUpdateUserInfo = OnUpdateUserInfo;
4943 if (handlerUpdateUserInfo != null) 5193 if (handlerUpdateUserInfo != null)
4944 { 5194 {
@@ -4957,6 +5207,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4957 case PacketType.SetStartLocationRequest: 5207 case PacketType.SetStartLocationRequest:
4958 SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack; 5208 SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack;
4959 5209
5210 #region Packet Session and User Check
5211 if (m_checkPackets)
5212 {
5213 if (avSetStartLocationRequestPacket.AgentData.SessionID != SessionId ||
5214 avSetStartLocationRequestPacket.AgentData.AgentID != AgentId)
5215 break;
5216 }
5217 #endregion
5218
4960 if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId) 5219 if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId)
4961 { 5220 {
4962 handlerSetStartLocationRequest = OnSetStartLocationRequest; 5221 handlerSetStartLocationRequest = OnSetStartLocationRequest;
@@ -4971,6 +5230,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4971 5230
4972 case PacketType.AgentThrottle: 5231 case PacketType.AgentThrottle:
4973 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack; 5232 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
5233
5234 #region Packet Session and User Check
5235 if (m_checkPackets)
5236 {
5237 if (atpack.AgentData.SessionID != SessionId ||
5238 atpack.AgentData.AgentID != AgentId)
5239 break;
5240 }
5241 #endregion
5242
4974 m_PacketHandler.PacketQueue.SetThrottleFromClient(atpack.Throttle.Throttles); 5243 m_PacketHandler.PacketQueue.SetThrottleFromClient(atpack.Throttle.Throttles);
4975 break; 5244 break;
4976 5245