aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2018-11-25 18:56:38 +0000
committerUbitUmarov2018-11-25 18:56:38 +0000
commitcded99626595dba9f15ad5485cf2fe1260c3266f (patch)
treef009cf3b84a56be880a919c30fe4ed13a5004bf3
parentavoid data references stuck in packet pools (diff)
downloadopensim-SC-cded99626595dba9f15ad5485cf2fe1260c3266f.zip
opensim-SC-cded99626595dba9f15ad5485cf2fe1260c3266f.tar.gz
opensim-SC-cded99626595dba9f15ad5485cf2fe1260c3266f.tar.bz2
opensim-SC-cded99626595dba9f15ad5485cf2fe1260c3266f.tar.xz
remove a dev only conditional on lludp handlers; change parcel lists updates a bit;
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs6
-rw-r--r--OpenSim/Framework/ILandObject.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs1286
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs27
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs86
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs2
7 files changed, 442 insertions, 969 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index f8bf583..1c042c4 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -182,10 +182,8 @@ namespace OpenSim.Framework
182 public delegate void ParcelAccessListRequest( 182 public delegate void ParcelAccessListRequest(
183 UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client); 183 UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
184 184
185 public delegate void ParcelAccessListUpdateRequest(UUID agentID, uint flags, 185 public delegate void ParcelAccessListUpdateRequest(UUID agentID, uint flags, UUID transactionID,
186 int landLocalID, UUID transactionID, int sequenceID, 186 int landLocalID, List<LandAccessEntry> entries, IClientAPI remote_client);
187 int sections, List<LandAccessEntry> entries,
188 IClientAPI remote_client);
189 187
190 public delegate void ParcelPropertiesRequest( 188 public delegate void ParcelPropertiesRequest(
191 int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client); 189 int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs
index a783256..1f39482 100644
--- a/OpenSim/Framework/ILandObject.cs
+++ b/OpenSim/Framework/ILandObject.cs
@@ -85,7 +85,7 @@ namespace OpenSim.Framework
85 void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client); 85 void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
86 List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag); 86 List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag);
87 void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client); 87 void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
88 void UpdateAccessList(uint flags, UUID transactionID, int sequenceID, int sections, List<LandAccessEntry> entries, IClientAPI remote_client); 88 void UpdateAccessList(uint flags, UUID transationID, List<LandAccessEntry> entries);
89 void UpdateLandBitmapByteArray(); 89 void UpdateLandBitmapByteArray();
90 void SetLandBitmapFromByteArray(); 90 void SetLandBitmapFromByteArray();
91 bool[,] GetLandBitmap(); 91 bool[,] GetLandBitmap();
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 4be5ef3..9feef4f 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -286,7 +286,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
286 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; 286 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
287 public event GenericCall2 OnUpdateThrottles; 287 public event GenericCall2 OnUpdateThrottles;
288 288
289
290#pragma warning disable 0067 289#pragma warning disable 0067
291 // still unused 290 // still unused
292 public event GenericMessage OnGenericMessage; 291 public event GenericMessage OnGenericMessage;
@@ -309,7 +308,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
309 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; 308 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
310 public event UpdateVector OnUpdatePrimScale; 309 public event UpdateVector OnUpdatePrimScale;
311 310
312
313#pragma warning restore 0067 311#pragma warning restore 0067
314 312
315 #endregion Events 313 #endregion Events
@@ -324,7 +322,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
324 322
325 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 323 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
326 private static string LogHeader = "[LLCLIENTVIEW]"; 324 private static string LogHeader = "[LLCLIENTVIEW]";
327 protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
328 325
329 /// <summary> 326 /// <summary>
330 /// Handles UDP texture download. 327 /// Handles UDP texture download.
@@ -395,7 +392,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
395 protected uint m_agentFOVCounter; 392 protected uint m_agentFOVCounter;
396 393
397 protected IAssetService m_assetService; 394 protected IAssetService m_assetService;
398 private const bool m_checkPackets = true;
399 395
400 #endregion Class Members 396 #endregion Class Members
401 397
@@ -676,20 +672,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
676 } 672 }
677 } 673 }
678 674
679 public static bool AddPacketHandler(PacketType packetType, PacketMethod handler)
680 {
681 bool result = false;
682 lock (PacketHandlers)
683 {
684 if (!PacketHandlers.ContainsKey(packetType))
685 {
686 PacketHandlers.Add(packetType, handler);
687 result = true;
688 }
689 }
690 return result;
691 }
692
693 /// <summary> 675 /// <summary>
694 /// Add a handler for the given packet type. 676 /// Add a handler for the given packet type.
695 /// </summary> 677 /// </summary>
@@ -753,13 +735,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
753 /// </summary> 735 /// </summary>
754 /// <param name="packet"></param> 736 /// <param name="packet"></param>
755 /// <returns>True if a handler was found which successfully processed the packet.</returns> 737 /// <returns>True if a handler was found which successfully processed the packet.</returns>
756 protected virtual bool ProcessPacketMethod(Packet packet) 738 protected bool ProcessPacketMethod(Packet packet)
757 { 739 {
758 bool result = false; 740 bool result = false;
759 PacketProcessor pprocessor; 741 PacketProcessor pprocessor;
760 if (m_packetHandlers.TryGetValue(packet.Type, out pprocessor)) 742 if (m_packetHandlers.TryGetValue(packet.Type, out pprocessor))
761 { 743 {
762
763 //there is a local handler for this packet type 744 //there is a local handler for this packet type
764 if (pprocessor.Async) 745 if (pprocessor.Async)
765 { 746 {
@@ -772,20 +753,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
772 result = pprocessor.method(this, packet); 753 result = pprocessor.method(this, packet);
773 } 754 }
774 } 755 }
775 else
776 {
777 //there is not a local handler so see if there is a Global handler
778 PacketMethod method = null;
779 bool found;
780 lock (PacketHandlers)
781 {
782 found = PacketHandlers.TryGetValue(packet.Type, out method);
783 }
784 if (found)
785 {
786 result = method(this, packet);
787 }
788 }
789 return result; 756 return result;
790 } 757 }
791 758
@@ -888,7 +855,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
888 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) 855 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
889 { 856 {
890 m_thisAgentUpdateArgs.CameraAtAxis.X = float.MinValue; 857 m_thisAgentUpdateArgs.CameraAtAxis.X = float.MinValue;
891// m_thisAgentUpdateArgs.ControlFlags = uint.MaxValue; 858 m_thisAgentUpdateArgs.lastUpdateTS = 0;
892 m_thisAgentUpdateArgs.ControlFlags = 0; 859 m_thisAgentUpdateArgs.ControlFlags = 0;
893 860
894 AgentMovementCompletePacket mov = (AgentMovementCompletePacket)PacketPool.Instance.GetPacket(PacketType.AgentMovementComplete); 861 AgentMovementCompletePacket mov = (AgentMovementCompletePacket)PacketPool.Instance.GetPacket(PacketType.AgentMovementComplete);
@@ -3934,7 +3901,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3934 else 3901 else
3935 ani.AnimationSourceList[i].ObjectID = objectIDs[i]; 3902 ani.AnimationSourceList[i].ObjectID = objectIDs[i];
3936 } 3903 }
3937 ani.Header.Reliable = false;
3938 OutPacket(ani, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); 3904 OutPacket(ani, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3939 } 3905 }
3940 3906
@@ -4154,6 +4120,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4154 4120
4155 private void ProcessEntityUpdates(int maxUpdatesBytes) 4121 private void ProcessEntityUpdates(int maxUpdatesBytes)
4156 { 4122 {
4123 if (!IsActive)
4124 return;
4125
4157 OpenSim.Framework.Lazy<List<EntityUpdate>> objectUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); 4126 OpenSim.Framework.Lazy<List<EntityUpdate>> objectUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>();
4158 OpenSim.Framework.Lazy<List<EntityUpdate>> compressedUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); 4127 OpenSim.Framework.Lazy<List<EntityUpdate>> compressedUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>();
4159 OpenSim.Framework.Lazy<List<EntityUpdate>> terseUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); 4128 OpenSim.Framework.Lazy<List<EntityUpdate>> terseUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>();
@@ -4423,7 +4392,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4423 4392
4424 ushort timeDilation; 4393 ushort timeDilation;
4425 4394
4426 if(!IsActive) 4395 if (!IsActive)
4427 return; 4396 return;
4428 4397
4429 timeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); 4398 timeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
@@ -4434,11 +4403,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4434 = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); 4403 = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
4435 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4404 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4436 packet.RegionData.TimeDilation = timeDilation; 4405 packet.RegionData.TimeDilation = timeDilation;
4437 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[terseAgentUpdateBlocks.Count]; 4406 packet.ObjectData = terseAgentUpdateBlocks.ToArray();
4438
4439 for (int i = 0; i < terseAgentUpdateBlocks.Count; i++)
4440 packet.ObjectData[i] = terseAgentUpdateBlocks[i];
4441
4442 terseAgentUpdateBlocks.Clear(); 4407 terseAgentUpdateBlocks.Clear();
4443 4408
4444 OutPacket(packet, ThrottleOutPacketType.Unknown, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseAgentUpdates.Value, oPacket); }); 4409 OutPacket(packet, ThrottleOutPacketType.Unknown, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseAgentUpdates.Value, oPacket); });
@@ -4449,11 +4414,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4449 ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); 4414 ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
4450 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4415 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4451 packet.RegionData.TimeDilation = timeDilation; 4416 packet.RegionData.TimeDilation = timeDilation;
4452 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[objectUpdateBlocks.Count]; 4417 packet.ObjectData = objectUpdateBlocks.ToArray();
4453
4454 for (int i = 0; i < objectUpdateBlocks.Count; i++)
4455 packet.ObjectData[i] = objectUpdateBlocks[i];
4456
4457 objectUpdateBlocks.Clear(); 4418 objectUpdateBlocks.Clear();
4458 4419
4459 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(objectUpdates.Value, oPacket); }); 4420 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(objectUpdates.Value, oPacket); });
@@ -4464,11 +4425,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4464 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed); 4425 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
4465 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4426 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4466 packet.RegionData.TimeDilation = timeDilation; 4427 packet.RegionData.TimeDilation = timeDilation;
4467 packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[compressedUpdateBlocks.Count]; 4428 packet.ObjectData = compressedUpdateBlocks.ToArray();
4468
4469 for (int i = 0; i < compressedUpdateBlocks.Count; i++)
4470 packet.ObjectData[i] = compressedUpdateBlocks[i];
4471
4472 compressedUpdateBlocks.Clear(); 4429 compressedUpdateBlocks.Clear();
4473 4430
4474 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(compressedUpdates.Value, oPacket); }); 4431 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(compressedUpdates.Value, oPacket); });
@@ -4476,16 +4433,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4476 4433
4477 if (terseUpdateBlocks.Count > 0) 4434 if (terseUpdateBlocks.Count > 0)
4478 { 4435 {
4479 ImprovedTerseObjectUpdatePacket packet 4436 ImprovedTerseObjectUpdatePacket packet = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(
4480 = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(
4481 PacketType.ImprovedTerseObjectUpdate); 4437 PacketType.ImprovedTerseObjectUpdate);
4482 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4438 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4483 packet.RegionData.TimeDilation = timeDilation; 4439 packet.RegionData.TimeDilation = timeDilation;
4484 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[terseUpdateBlocks.Count]; 4440 packet.ObjectData = terseUpdateBlocks.ToArray();
4485
4486 for (int i = 0; i < terseUpdateBlocks.Count; i++)
4487 packet.ObjectData[i] = terseUpdateBlocks[i];
4488
4489 terseUpdateBlocks.Clear(); 4441 terseUpdateBlocks.Clear();
4490 4442
4491 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); 4443 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); });
@@ -4769,7 +4721,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4769 ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 4721 ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
4770 { 4722 {
4771 ImageDataPacket im = new ImageDataPacket(); 4723 ImageDataPacket im = new ImageDataPacket();
4772 im.Header.Reliable = false;
4773 im.ImageID.Packets = numParts; 4724 im.ImageID.Packets = numParts;
4774 im.ImageID.ID = ImageUUID; 4725 im.ImageID.ID = ImageUUID;
4775 4726
@@ -4785,7 +4736,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4785 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) 4736 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
4786 { 4737 {
4787 ImagePacketPacket im = new ImagePacketPacket(); 4738 ImagePacketPacket im = new ImagePacketPacket();
4788 im.Header.Reliable = false;
4789 im.ImageID.Packet = partNumber; 4739 im.ImageID.Packet = partNumber;
4790 im.ImageID.ID = imageUuid; 4740 im.ImageID.ID = imageUuid;
4791 im.ImageData.Data = imageData; 4741 im.ImageData.Data = imageData;
@@ -5309,7 +5259,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5309 returnblock[9].Parameter = Utils.StringToBytes(abuseEmail); 5259 returnblock[9].Parameter = Utils.StringToBytes(abuseEmail);
5310 5260
5311 packet.ParamList = returnblock; 5261 packet.ParamList = returnblock;
5312 packet.Header.Reliable = false;
5313 //m_log.Debug("[ESTATE]: SIM--->" + packet.ToString()); 5262 //m_log.Debug("[ESTATE]: SIM--->" + packet.ToString());
5314 OutPacket(packet, ThrottleOutPacketType.Task); 5263 OutPacket(packet, ThrottleOutPacketType.Task);
5315 } 5264 }
@@ -5632,8 +5581,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5632 { 5581 {
5633 rotation.X = 0f; 5582 rotation.X = 0f;
5634 rotation.Y = 0f; 5583 rotation.Y = 0f;
5635 rotation.Normalize();
5636 } 5584 }
5585 rotation.Normalize();
5637 angularVelocity = presence.AngularVelocity; 5586 angularVelocity = presence.AngularVelocity;
5638 5587
5639// m_log.DebugFormat( 5588// m_log.DebugFormat(
@@ -5754,6 +5703,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5754 { 5703 {
5755 Vector3 offsetPosition = data.OffsetPosition; 5704 Vector3 offsetPosition = data.OffsetPosition;
5756 Quaternion rotation = data.Rotation; 5705 Quaternion rotation = data.Rotation;
5706 // tpvs can only see rotations around Z in some cases
5707 if(!data.Flying && !data.IsSatOnObject)
5708 {
5709 rotation.X = 0f;
5710 rotation.Y = 0f;
5711 }
5712 rotation.Normalize();
5713
5757 uint parentID = data.ParentID; 5714 uint parentID = data.ParentID;
5758 5715
5759// m_log.DebugFormat( 5716// m_log.DebugFormat(
@@ -5763,13 +5720,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5763 5720
5764 Vector3 velocity = new Vector3(0, 0, 0); 5721 Vector3 velocity = new Vector3(0, 0, 0);
5765 Vector3 acceleration = new Vector3(0, 0, 0); 5722 Vector3 acceleration = new Vector3(0, 0, 0);
5766 // tpvs can only see rotations around Z in some cases
5767 if(!data.Flying && !data.IsSatOnObject)
5768 {
5769 rotation.X = 0f;
5770 rotation.Y = 0f;
5771 }
5772 rotation.Normalize();
5773 5723
5774 data.CollisionPlane.ToBytes(objectData, 0); 5724 data.CollisionPlane.ToBytes(objectData, 0);
5775 offsetPosition.ToBytes(objectData, 16); 5725 offsetPosition.ToBytes(objectData, 16);
@@ -6288,8 +6238,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6288 6238
6289 // Threshold for body rotation to be a significant agent update 6239 // Threshold for body rotation to be a significant agent update
6290 // use the abs of cos 6240 // use the abs of cos
6291 private const float QDELTABody = 1.0f - 0.00005f; 6241 private const float QDELTABody = 1.0f - 0.00001f;
6292 private const float QDELTAHead = 1.0f - 0.00005f; 6242 private const float QDELTAHead = 1.0f - 0.00001f;
6293 // Threshold for camera rotation to be a significant agent update 6243 // Threshold for camera rotation to be a significant agent update
6294 private const float VDELTA = 0.01f; 6244 private const float VDELTA = 0.01f;
6295 6245
@@ -6323,16 +6273,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6323 ) 6273 )
6324 return true; 6274 return true;
6325 6275
6326 float qdelta1 = Math.Abs(Quaternion.Dot(x.BodyRotation, m_thisAgentUpdateArgs.BodyRotation)); 6276 float qdelta = Math.Abs(Quaternion.Dot(x.BodyRotation, m_thisAgentUpdateArgs.BodyRotation));
6327 //qdelta2 = Math.Abs(Quaternion.Dot(x.HeadRotation, m_thisAgentUpdateArgs.HeadRotation)); 6277 if(qdelta < QDELTABody) // significant if body rotation above(below cos) threshold
6328
6329 if(
6330 qdelta1 < QDELTABody // significant if body rotation above(below cos) threshold
6331 // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
6332 // || qdelta2 < QDELTAHead // significant if head rotation above(below cos) threshold
6333 )
6334 return true; 6278 return true;
6335 6279
6336 return false; 6280 return false;
6337 } 6281 }
6338 6282
@@ -6367,6 +6311,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6367 6311
6368 private bool HandleAgentUpdate(IClientAPI sender, Packet packet) 6312 private bool HandleAgentUpdate(IClientAPI sender, Packet packet)
6369 { 6313 {
6314 if(OnAgentUpdate == null)
6315 {
6316 PacketPool.Instance.ReturnPacket(packet);
6317 return false;
6318 }
6319
6370 AgentUpdatePacket agentUpdate = (AgentUpdatePacket)packet; 6320 AgentUpdatePacket agentUpdate = (AgentUpdatePacket)packet;
6371 AgentUpdatePacket.AgentDataBlock x = agentUpdate.AgentData; 6321 AgentUpdatePacket.AgentDataBlock x = agentUpdate.AgentData;
6372 6322
@@ -6391,8 +6341,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6391 6341
6392 m_thisAgentUpdateArgs.lastpacketSequence = seq; 6342 m_thisAgentUpdateArgs.lastpacketSequence = seq;
6393 6343
6394 bool movement = CheckAgentMovementUpdateSignificance(x); 6344 OnPreAgentUpdate?.Invoke(this, m_thisAgentUpdateArgs);
6395 bool camera = CheckAgentCameraUpdateSignificance(x); 6345
6346 bool movement;
6347 bool camera;
6348
6349 double now = Util.GetTimeStampMS();
6350 if(now - m_thisAgentUpdateArgs.lastUpdateTS > 500.0) // at least 2 per sec
6351 {
6352 movement = true;
6353 camera = true;
6354 }
6355 else
6356 {
6357 movement = CheckAgentMovementUpdateSignificance(x);
6358 camera = CheckAgentCameraUpdateSignificance(x);
6359 }
6396 6360
6397 // Was there a significant movement/state change? 6361 // Was there a significant movement/state change?
6398 if (movement) 6362 if (movement)
@@ -6406,15 +6370,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6406 6370
6407 m_thisAgentUpdateArgs.NeedsCameraCollision = !camera; 6371 m_thisAgentUpdateArgs.NeedsCameraCollision = !camera;
6408 6372
6409 UpdateAgent handlerAgentUpdate = OnAgentUpdate; 6373 OnAgentUpdate?.Invoke(this, m_thisAgentUpdateArgs);
6410 UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate;
6411
6412 if (handlerPreAgentUpdate != null)
6413 OnPreAgentUpdate(this, m_thisAgentUpdateArgs);
6414
6415 if (handlerAgentUpdate != null)
6416 OnAgentUpdate(this, m_thisAgentUpdateArgs);
6417
6418 } 6374 }
6419 6375
6420 // Was there a significant camera(s) change? 6376 // Was there a significant camera(s) change?
@@ -6427,15 +6383,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6427 6383
6428 m_thisAgentUpdateArgs.NeedsCameraCollision = true; 6384 m_thisAgentUpdateArgs.NeedsCameraCollision = true;
6429 6385
6430 UpdateAgent handlerAgentCameraUpdate = OnAgentCameraUpdate; 6386 OnAgentCameraUpdate?.Invoke(this, m_thisAgentUpdateArgs);
6431
6432 if (handlerAgentCameraUpdate != null)
6433 handlerAgentCameraUpdate(this, m_thisAgentUpdateArgs);
6434
6435 } 6387 }
6436 6388
6437 PacketPool.Instance.ReturnPacket(packet); 6389 if(movement && camera)
6390 m_thisAgentUpdateArgs.lastUpdateTS = now;
6438 6391
6392 PacketPool.Instance.ReturnPacket(packet);
6439 return true; 6393 return true;
6440 } 6394 }
6441 6395
@@ -6691,12 +6645,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6691 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; 6645 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
6692 6646
6693 #region Packet Session and User Check 6647 #region Packet Session and User Check
6694 if (m_checkPackets) 6648
6695 { 6649 if (avatarProperties.AgentData.SessionID != SessionId ||
6696 if (avatarProperties.AgentData.SessionID != SessionId ||
6697 avatarProperties.AgentData.AgentID != AgentId) 6650 avatarProperties.AgentData.AgentID != AgentId)
6698 return true; 6651 return true;
6699 }
6700 #endregion 6652 #endregion
6701 6653
6702 RequestAvatarProperties handlerRequestAvatarProperties = OnRequestAvatarProperties; 6654 RequestAvatarProperties handlerRequestAvatarProperties = OnRequestAvatarProperties;
@@ -6712,12 +6664,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6712 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; 6664 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
6713 6665
6714 #region Packet Session and User Check 6666 #region Packet Session and User Check
6715 if (m_checkPackets) 6667 if (inchatpack.AgentData.SessionID != SessionId ||
6716 {
6717 if (inchatpack.AgentData.SessionID != SessionId ||
6718 inchatpack.AgentData.AgentID != AgentId) 6668 inchatpack.AgentData.AgentID != AgentId)
6719 return true; 6669 return true;
6720 } 6670
6721 #endregion 6671 #endregion
6722 6672
6723 string fromName = String.Empty; //ClientAvatar.firstname + " " + ClientAvatar.lastname; 6673 string fromName = String.Empty; //ClientAvatar.firstname + " " + ClientAvatar.lastname;
@@ -6753,12 +6703,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6753 AvatarPropertiesUpdatePacket avatarProps = (AvatarPropertiesUpdatePacket)Pack; 6703 AvatarPropertiesUpdatePacket avatarProps = (AvatarPropertiesUpdatePacket)Pack;
6754 6704
6755 #region Packet Session and User Check 6705 #region Packet Session and User Check
6756 if (m_checkPackets) 6706 if (avatarProps.AgentData.SessionID != SessionId ||
6757 {
6758 if (avatarProps.AgentData.SessionID != SessionId ||
6759 avatarProps.AgentData.AgentID != AgentId) 6707 avatarProps.AgentData.AgentID != AgentId)
6760 return true; 6708 return true;
6761 }
6762 #endregion 6709 #endregion
6763 6710
6764 UpdateAvatarProperties handlerUpdateAvatarProperties = OnUpdateAvatarProperties; 6711 UpdateAvatarProperties handlerUpdateAvatarProperties = OnUpdateAvatarProperties;
@@ -6788,12 +6735,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6788 //m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID); 6735 //m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID);
6789 6736
6790 #region Packet Session and User Check 6737 #region Packet Session and User Check
6791 if (m_checkPackets) 6738 if (rdialog.AgentData.SessionID != SessionId ||
6792 {
6793 if (rdialog.AgentData.SessionID != SessionId ||
6794 rdialog.AgentData.AgentID != AgentId) 6739 rdialog.AgentData.AgentID != AgentId)
6795 return true; 6740 return true;
6796 } 6741
6797 #endregion 6742 #endregion
6798 6743
6799 int ch = rdialog.Data.ChatChannel; 6744 int ch = rdialog.Data.ChatChannel;
@@ -6821,12 +6766,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6821 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; 6766 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack;
6822 6767
6823 #region Packet Session and User Check 6768 #region Packet Session and User Check
6824 if (m_checkPackets) 6769 if (msgpack.AgentData.SessionID != SessionId ||
6825 {
6826 if (msgpack.AgentData.SessionID != SessionId ||
6827 msgpack.AgentData.AgentID != AgentId) 6770 msgpack.AgentData.AgentID != AgentId)
6828 return true; 6771 return true;
6829 }
6830 #endregion 6772 #endregion
6831 6773
6832 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); 6774 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName);
@@ -6859,12 +6801,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6859 AcceptFriendshipPacket afriendpack = (AcceptFriendshipPacket)Pack; 6801 AcceptFriendshipPacket afriendpack = (AcceptFriendshipPacket)Pack;
6860 6802
6861 #region Packet Session and User Check 6803 #region Packet Session and User Check
6862 if (m_checkPackets) 6804
6863 { 6805 if (afriendpack.AgentData.SessionID != SessionId ||
6864 if (afriendpack.AgentData.SessionID != SessionId ||
6865 afriendpack.AgentData.AgentID != AgentId) 6806 afriendpack.AgentData.AgentID != AgentId)
6866 return true; 6807 return true;
6867 }
6868 #endregion 6808 #endregion
6869 6809
6870 // My guess is this is the folder to stick the calling card into 6810 // My guess is this is the folder to stick the calling card into
@@ -6891,12 +6831,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6891 DeclineFriendshipPacket dfriendpack = (DeclineFriendshipPacket)Pack; 6831 DeclineFriendshipPacket dfriendpack = (DeclineFriendshipPacket)Pack;
6892 6832
6893 #region Packet Session and User Check 6833 #region Packet Session and User Check
6894 if (m_checkPackets) 6834
6895 { 6835 if (dfriendpack.AgentData.SessionID != SessionId ||
6896 if (dfriendpack.AgentData.SessionID != SessionId ||
6897 dfriendpack.AgentData.AgentID != AgentId) 6836 dfriendpack.AgentData.AgentID != AgentId)
6898 return true; 6837 return true;
6899 }
6900 #endregion 6838 #endregion
6901 6839
6902 if (OnDenyFriendRequest != null) 6840 if (OnDenyFriendRequest != null)
@@ -6913,12 +6851,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6913 TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack; 6851 TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack;
6914 6852
6915 #region Packet Session and User Check 6853 #region Packet Session and User Check
6916 if (m_checkPackets) 6854 if (tfriendpack.AgentData.SessionID != SessionId ||
6917 {
6918 if (tfriendpack.AgentData.SessionID != SessionId ||
6919 tfriendpack.AgentData.AgentID != AgentId) 6855 tfriendpack.AgentData.AgentID != AgentId)
6920 return true; 6856 return true;
6921 }
6922 #endregion 6857 #endregion
6923 6858
6924 UUID exFriendID = tfriendpack.ExBlock.OtherID; 6859 UUID exFriendID = tfriendpack.ExBlock.OtherID;
@@ -6967,12 +6902,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6967 RezObjectPacket rezPacket = (RezObjectPacket)Pack; 6902 RezObjectPacket rezPacket = (RezObjectPacket)Pack;
6968 6903
6969 #region Packet Session and User Check 6904 #region Packet Session and User Check
6970 if (m_checkPackets) 6905 if (rezPacket.AgentData.SessionID != SessionId ||
6971 {
6972 if (rezPacket.AgentData.SessionID != SessionId ||
6973 rezPacket.AgentData.AgentID != AgentId) 6906 rezPacket.AgentData.AgentID != AgentId)
6974 return true; 6907 return true;
6975 } 6908
6976 #endregion 6909 #endregion
6977 6910
6978 RezObject handlerRezObject = OnRezObject; 6911 RezObject handlerRezObject = OnRezObject;
@@ -7002,12 +6935,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7002 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack; 6935 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack;
7003 6936
7004 #region Packet Session and User Check 6937 #region Packet Session and User Check
7005 if (m_checkPackets) 6938 if (DeRezPacket.AgentData.SessionID != SessionId ||
7006 {
7007 if (DeRezPacket.AgentData.SessionID != SessionId ||
7008 DeRezPacket.AgentData.AgentID != AgentId) 6939 DeRezPacket.AgentData.AgentID != AgentId)
7009 return true; 6940 return true;
7010 }
7011 #endregion 6941 #endregion
7012 6942
7013 uint seq = DeRezPacket.Header.Sequence; 6943 uint seq = DeRezPacket.Header.Sequence;
@@ -7059,13 +6989,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7059 RezRestoreToWorldPacket restore = (RezRestoreToWorldPacket)Pack; 6989 RezRestoreToWorldPacket restore = (RezRestoreToWorldPacket)Pack;
7060 6990
7061 #region Packet Session and User Check 6991 #region Packet Session and User Check
7062 if (m_checkPackets) 6992 if (restore.AgentData.SessionID != SessionId ||
7063 {
7064 if (restore.AgentData.SessionID != SessionId ||
7065 restore.AgentData.AgentID != AgentId) 6993 restore.AgentData.AgentID != AgentId)
7066 return true; 6994 return true;
7067 } 6995 #endregion
7068 #endregion
7069 6996
7070 RezRestoreToWorld handlerRezRestoreToWorld = OnRezRestoreToWorld; 6997 RezRestoreToWorld handlerRezRestoreToWorld = OnRezRestoreToWorld;
7071 if (handlerRezRestoreToWorld != null) 6998 if (handlerRezRestoreToWorld != null)
@@ -7079,12 +7006,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7079 ModifyLandPacket modify = (ModifyLandPacket)Pack; 7006 ModifyLandPacket modify = (ModifyLandPacket)Pack;
7080 7007
7081 #region Packet Session and User Check 7008 #region Packet Session and User Check
7082 if (m_checkPackets) 7009 if (modify.AgentData.SessionID != SessionId ||
7083 {
7084 if (modify.AgentData.SessionID != SessionId ||
7085 modify.AgentData.AgentID != AgentId) 7010 modify.AgentData.AgentID != AgentId)
7086 return true; 7011 return true;
7087 }
7088 7012
7089 #endregion 7013 #endregion
7090 //m_log.Info("[LAND]: LAND:" + modify.ToString()); 7014 //m_log.Info("[LAND]: LAND:" + modify.ToString());
@@ -7147,12 +7071,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7147 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; 7071 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
7148 7072
7149 #region Packet Session and User Check 7073 #region Packet Session and User Check
7150 if (m_checkPackets) 7074 if (appear.AgentData.SessionID != SessionId ||
7151 {
7152 if (appear.AgentData.SessionID != SessionId ||
7153 appear.AgentData.AgentID != AgentId) 7075 appear.AgentData.AgentID != AgentId)
7154 return true; 7076 return true;
7155 } 7077
7156 #endregion 7078 #endregion
7157 7079
7158 SetAppearance handlerSetAppearance = OnSetAppearance; 7080 SetAppearance handlerSetAppearance = OnSetAppearance;
@@ -7180,8 +7102,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7180 TextureIndex=Convert.ToUInt32(appear.WearableData[i].TextureIndex) 7102 TextureIndex=Convert.ToUInt32(appear.WearableData[i].TextureIndex)
7181 }; 7103 };
7182 7104
7183
7184
7185 handlerSetAppearance(sender, te, visualparams,avSize, cacheitems); 7105 handlerSetAppearance(sender, te, visualparams,avSize, cacheitems);
7186 } 7106 }
7187 catch (Exception e) 7107 catch (Exception e)
@@ -7202,12 +7122,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7202 AgentIsNowWearingPacket nowWearing = (AgentIsNowWearingPacket)Pack; 7122 AgentIsNowWearingPacket nowWearing = (AgentIsNowWearingPacket)Pack;
7203 7123
7204 #region Packet Session and User Check 7124 #region Packet Session and User Check
7205 if (m_checkPackets) 7125 if (nowWearing.AgentData.SessionID != SessionId ||
7206 {
7207 if (nowWearing.AgentData.SessionID != SessionId ||
7208 nowWearing.AgentData.AgentID != AgentId) 7126 nowWearing.AgentData.AgentID != AgentId)
7209 return true; 7127 return true;
7210 }
7211 #endregion 7128 #endregion
7212 7129
7213 AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); 7130 AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
@@ -7237,13 +7154,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7237 RezSingleAttachmentFromInvPacket rez = (RezSingleAttachmentFromInvPacket)Pack; 7154 RezSingleAttachmentFromInvPacket rez = (RezSingleAttachmentFromInvPacket)Pack;
7238 7155
7239 #region Packet Session and User Check 7156 #region Packet Session and User Check
7240 if (m_checkPackets) 7157 if (rez.AgentData.SessionID != SessionId ||
7241 {
7242 if (rez.AgentData.SessionID != SessionId ||
7243 rez.AgentData.AgentID != AgentId) 7158 rez.AgentData.AgentID != AgentId)
7244 return true; 7159 return true;
7245 } 7160 #endregion
7246 #endregion
7247 7161
7248 handlerRezSingleAttachment(this, rez.ObjectData.ItemID, 7162 handlerRezSingleAttachment(this, rez.ObjectData.ItemID,
7249 rez.ObjectData.AttachmentPt); 7163 rez.ObjectData.AttachmentPt);
@@ -7292,12 +7206,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7292 ObjectAttachPacket att = (ObjectAttachPacket)Pack; 7206 ObjectAttachPacket att = (ObjectAttachPacket)Pack;
7293 7207
7294 #region Packet Session and User Check 7208 #region Packet Session and User Check
7295 if (m_checkPackets) 7209 if (att.AgentData.SessionID != SessionId ||
7296 {
7297 if (att.AgentData.SessionID != SessionId ||
7298 att.AgentData.AgentID != AgentId) 7210 att.AgentData.AgentID != AgentId)
7299 return true; 7211 return true;
7300 }
7301 #endregion 7212 #endregion
7302 7213
7303 ObjectAttach handlerObjectAttach = OnObjectAttach; 7214 ObjectAttach handlerObjectAttach = OnObjectAttach;
@@ -7318,12 +7229,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7318 ObjectDetachPacket dett = (ObjectDetachPacket)Pack; 7229 ObjectDetachPacket dett = (ObjectDetachPacket)Pack;
7319 7230
7320 #region Packet Session and User Check 7231 #region Packet Session and User Check
7321 if (m_checkPackets) 7232 if (dett.AgentData.SessionID != SessionId ||
7322 {
7323 if (dett.AgentData.SessionID != SessionId ||
7324 dett.AgentData.AgentID != AgentId) 7233 dett.AgentData.AgentID != AgentId)
7325 return true; 7234 return true;
7326 }
7327 #endregion 7235 #endregion
7328 7236
7329 for (int j = 0; j < dett.ObjectData.Length; j++) 7237 for (int j = 0; j < dett.ObjectData.Length; j++)
@@ -7344,12 +7252,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7344 ObjectDropPacket dropp = (ObjectDropPacket)Pack; 7252 ObjectDropPacket dropp = (ObjectDropPacket)Pack;
7345 7253
7346 #region Packet Session and User Check 7254 #region Packet Session and User Check
7347 if (m_checkPackets) 7255 if (dropp.AgentData.SessionID != SessionId ||
7348 {
7349 if (dropp.AgentData.SessionID != SessionId ||
7350 dropp.AgentData.AgentID != AgentId) 7256 dropp.AgentData.AgentID != AgentId)
7351 return true; 7257 return true;
7352 }
7353 #endregion 7258 #endregion
7354 7259
7355 for (int j = 0; j < dropp.ObjectData.Length; j++) 7260 for (int j = 0; j < dropp.ObjectData.Length; j++)
@@ -7369,12 +7274,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7369 SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack; 7274 SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack;
7370 7275
7371 #region Packet Session and User Check 7276 #region Packet Session and User Check
7372 if (m_checkPackets) 7277 if (run.AgentData.SessionID != SessionId ||
7373 {
7374 if (run.AgentData.SessionID != SessionId ||
7375 run.AgentData.AgentID != AgentId) 7278 run.AgentData.AgentID != AgentId)
7376 return true; 7279 return true;
7377 }
7378 #endregion 7280 #endregion
7379 7281
7380 SetAlwaysRun handlerSetAlwaysRun = OnSetAlwaysRun; 7282 SetAlwaysRun handlerSetAlwaysRun = OnSetAlwaysRun;
@@ -7406,38 +7308,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7406 AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack; 7308 AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack;
7407 7309
7408 #region Packet Session and User Check 7310 #region Packet Session and User Check
7409 if (m_checkPackets) 7311 if (AgentAni.AgentData.SessionID != SessionId ||
7410 {
7411 if (AgentAni.AgentData.SessionID != SessionId ||
7412 AgentAni.AgentData.AgentID != AgentId) 7312 AgentAni.AgentData.AgentID != AgentId)
7413 return true; 7313 return true;
7414 }
7415 #endregion 7314 #endregion
7416/*
7417 StartAnim handlerStartAnim = null;
7418 StopAnim handlerStopAnim = null;
7419 7315
7420 for (int i = 0; i < AgentAni.AnimationList.Length; i++)
7421 {
7422 if (AgentAni.AnimationList[i].StartAnim)
7423 {
7424 handlerStartAnim = OnStartAnim;
7425 if (handlerStartAnim != null)
7426 {
7427 handlerStartAnim(this, AgentAni.AnimationList[i].AnimID);
7428 }
7429 }
7430 else
7431 {
7432 handlerStopAnim = OnStopAnim;
7433 if (handlerStopAnim != null)
7434 {
7435 handlerStopAnim(this, AgentAni.AnimationList[i].AnimID);
7436 }
7437 }
7438 }
7439 return true;
7440*/
7441 ChangeAnim handlerChangeAnim = null; 7316 ChangeAnim handlerChangeAnim = null;
7442 7317
7443 for (int i = 0; i < AgentAni.AnimationList.Length; i++) 7318 for (int i = 0; i < AgentAni.AnimationList.Length; i++)
@@ -7465,13 +7340,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7465 AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack; 7340 AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack;
7466 7341
7467 #region Packet Session and User Check 7342 #region Packet Session and User Check
7468 if (m_checkPackets) 7343 if (agentRequestSit.AgentData.SessionID != SessionId ||
7469 {
7470 if (agentRequestSit.AgentData.SessionID != SessionId ||
7471 agentRequestSit.AgentData.AgentID != AgentId) 7344 agentRequestSit.AgentData.AgentID != AgentId)
7472 return true; 7345 return true;
7473 } 7346 #endregion
7474 #endregion
7475 7347
7476 if (SceneAgent.IsChildAgent) 7348 if (SceneAgent.IsChildAgent)
7477 { 7349 {
@@ -7495,12 +7367,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7495 AgentSitPacket agentSit = (AgentSitPacket)Pack; 7367 AgentSitPacket agentSit = (AgentSitPacket)Pack;
7496 7368
7497 #region Packet Session and User Check 7369 #region Packet Session and User Check
7498 if (m_checkPackets) 7370 if (agentSit.AgentData.SessionID != SessionId ||
7499 {
7500 if (agentSit.AgentData.SessionID != SessionId ||
7501 agentSit.AgentData.AgentID != AgentId) 7371 agentSit.AgentData.AgentID != AgentId)
7502 return true; 7372 return true;
7503 }
7504 #endregion 7373 #endregion
7505 7374
7506 if (SceneAgent.IsChildAgent) 7375 if (SceneAgent.IsChildAgent)
@@ -7531,10 +7400,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7531 SoundTriggerPacket soundTriggerPacket = (SoundTriggerPacket)Pack; 7400 SoundTriggerPacket soundTriggerPacket = (SoundTriggerPacket)Pack;
7532 7401
7533 #region Packet Session and User Check 7402 #region Packet Session and User Check
7534 if (m_checkPackets)
7535 {
7536 // UNSUPPORTED ON THIS PACKET
7537 }
7538 #endregion 7403 #endregion
7539 7404
7540 SoundTrigger handlerSoundTrigger = OnSoundTrigger; 7405 SoundTrigger handlerSoundTrigger = OnSoundTrigger;
@@ -7554,12 +7419,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7554 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; 7419 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack;
7555 7420
7556 #region Packet Session and User Check 7421 #region Packet Session and User Check
7557 if (m_checkPackets) 7422 if (avRequestQuery.AgentData.SessionID != SessionId ||
7558 {
7559 if (avRequestQuery.AgentData.SessionID != SessionId ||
7560 avRequestQuery.AgentData.AgentID != AgentId) 7423 avRequestQuery.AgentData.AgentID != AgentId)
7561 return true; 7424 return true;
7562 }
7563 #endregion 7425 #endregion
7564 7426
7565 AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData; 7427 AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData;
@@ -7580,12 +7442,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7580 AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack; 7442 AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack;
7581 7443
7582 #region Packet Session and User Check 7444 #region Packet Session and User Check
7583 if (m_checkPackets) 7445 if (avRequestDataUpdatePacket.AgentData.SessionID != SessionId ||
7584 {
7585 if (avRequestDataUpdatePacket.AgentData.SessionID != SessionId ||
7586 avRequestDataUpdatePacket.AgentData.AgentID != AgentId) 7446 avRequestDataUpdatePacket.AgentData.AgentID != AgentId)
7587 return true; 7447 return true;
7588 }
7589 #endregion 7448 #endregion
7590 7449
7591 FetchInventory handlerAgentDataUpdateRequest = OnAgentDataUpdateRequest; 7450 FetchInventory handlerAgentDataUpdateRequest = OnAgentDataUpdateRequest;
@@ -7617,12 +7476,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7617 UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack; 7476 UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack;
7618 7477
7619 #region Packet Session and User Check 7478 #region Packet Session and User Check
7620 if (m_checkPackets) 7479 if (updateUserInfo.AgentData.SessionID != SessionId ||
7621 {
7622 if (updateUserInfo.AgentData.SessionID != SessionId ||
7623 updateUserInfo.AgentData.AgentID != AgentId) 7480 updateUserInfo.AgentData.AgentID != AgentId)
7624 return true; 7481 return true;
7625 }
7626 #endregion 7482 #endregion
7627 7483
7628 UpdateUserInfo handlerUpdateUserInfo = OnUpdateUserInfo; 7484 UpdateUserInfo handlerUpdateUserInfo = OnUpdateUserInfo;
@@ -7646,12 +7502,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7646 SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack; 7502 SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack;
7647 7503
7648 #region Packet Session and User Check 7504 #region Packet Session and User Check
7649 if (m_checkPackets) 7505 if (avSetStartLocationRequestPacket.AgentData.SessionID != SessionId ||
7650 {
7651 if (avSetStartLocationRequestPacket.AgentData.SessionID != SessionId ||
7652 avSetStartLocationRequestPacket.AgentData.AgentID != AgentId) 7506 avSetStartLocationRequestPacket.AgentData.AgentID != AgentId)
7653 return true; 7507 return true;
7654 }
7655 #endregion 7508 #endregion
7656 7509
7657 if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId) 7510 if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId)
@@ -7690,12 +7543,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7690 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack; 7543 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
7691 7544
7692 #region Packet Session and User Check 7545 #region Packet Session and User Check
7693 if (m_checkPackets) 7546 if (atpack.AgentData.SessionID != SessionId ||
7694 {
7695 if (atpack.AgentData.SessionID != SessionId ||
7696 atpack.AgentData.AgentID != AgentId) 7547 atpack.AgentData.AgentID != AgentId)
7697 return true; 7548 return true;
7698 }
7699 #endregion 7549 #endregion
7700 7550
7701 m_udpClient.SetThrottles(atpack.Throttle.Throttles); 7551 m_udpClient.SetThrottles(atpack.Throttle.Throttles);
@@ -7739,12 +7589,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7739 ObjectLinkPacket link = (ObjectLinkPacket)Pack; 7589 ObjectLinkPacket link = (ObjectLinkPacket)Pack;
7740 7590
7741 #region Packet Session and User Check 7591 #region Packet Session and User Check
7742 if (m_checkPackets) 7592 if (link.AgentData.SessionID != SessionId ||
7743 {
7744 if (link.AgentData.SessionID != SessionId ||
7745 link.AgentData.AgentID != AgentId) 7593 link.AgentData.AgentID != AgentId)
7746 return true; 7594 return true;
7747 }
7748 #endregion 7595 #endregion
7749 7596
7750 uint parentprimid = 0; 7597 uint parentprimid = 0;
@@ -7771,12 +7618,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7771 ObjectDelinkPacket delink = (ObjectDelinkPacket)Pack; 7618 ObjectDelinkPacket delink = (ObjectDelinkPacket)Pack;
7772 7619
7773 #region Packet Session and User Check 7620 #region Packet Session and User Check
7774 if (m_checkPackets) 7621 if (delink.AgentData.SessionID != SessionId ||
7775 {
7776 if (delink.AgentData.SessionID != SessionId ||
7777 delink.AgentData.AgentID != AgentId) 7622 delink.AgentData.AgentID != AgentId)
7778 return true; 7623 return true;
7779 }
7780 #endregion 7624 #endregion
7781 7625
7782 // It appears the prim at index 0 is not always the root prim (for 7626 // It appears the prim at index 0 is not always the root prim (for
@@ -7804,12 +7648,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7804 ObjectAddPacket addPacket = (ObjectAddPacket)Pack; 7648 ObjectAddPacket addPacket = (ObjectAddPacket)Pack;
7805 7649
7806 #region Packet Session and User Check 7650 #region Packet Session and User Check
7807 if (m_checkPackets) 7651 if (addPacket.AgentData.SessionID != SessionId ||
7808 {
7809 if (addPacket.AgentData.SessionID != SessionId ||
7810 addPacket.AgentData.AgentID != AgentId) 7652 addPacket.AgentData.AgentID != AgentId)
7811 return true; 7653 return true;
7812 }
7813 #endregion 7654 #endregion
7814 7655
7815 PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); 7656 PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket);
@@ -7834,12 +7675,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7834 ObjectShapePacket shapePacket = (ObjectShapePacket)Pack; 7675 ObjectShapePacket shapePacket = (ObjectShapePacket)Pack;
7835 7676
7836 #region Packet Session and User Check 7677 #region Packet Session and User Check
7837 if (m_checkPackets) 7678 if (shapePacket.AgentData.SessionID != SessionId ||
7838 {
7839 if (shapePacket.AgentData.SessionID != SessionId ||
7840 shapePacket.AgentData.AgentID != AgentId) 7679 shapePacket.AgentData.AgentID != AgentId)
7841 return true; 7680 return true;
7842 }
7843 #endregion 7681 #endregion
7844 7682
7845 UpdateShape handlerUpdatePrimShape = null; 7683 UpdateShape handlerUpdatePrimShape = null;
@@ -7881,12 +7719,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7881 ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack; 7719 ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack;
7882 7720
7883 #region Packet Session and User Check 7721 #region Packet Session and User Check
7884 if (m_checkPackets) 7722 if (extraPar.AgentData.SessionID != SessionId ||
7885 {
7886 if (extraPar.AgentData.SessionID != SessionId ||
7887 extraPar.AgentData.AgentID != AgentId) 7723 extraPar.AgentData.AgentID != AgentId)
7888 return true; 7724 return true;
7889 }
7890 #endregion 7725 #endregion
7891 7726
7892 ObjectExtraParams handlerUpdateExtraParams = OnUpdateExtraParams; 7727 ObjectExtraParams handlerUpdateExtraParams = OnUpdateExtraParams;
@@ -7907,12 +7742,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7907 ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; 7742 ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack;
7908 7743
7909 #region Packet Session and User Check 7744 #region Packet Session and User Check
7910 if (m_checkPackets) 7745 if (dupe.AgentData.SessionID != SessionId ||
7911 {
7912 if (dupe.AgentData.SessionID != SessionId ||
7913 dupe.AgentData.AgentID != AgentId) 7746 dupe.AgentData.AgentID != AgentId)
7914 return true; 7747 return true;
7915 }
7916 #endregion 7748 #endregion
7917 7749
7918// ObjectDuplicatePacket.AgentDataBlock AgentandGroupData = dupe.AgentData; 7750// ObjectDuplicatePacket.AgentDataBlock AgentandGroupData = dupe.AgentData;
@@ -7941,12 +7773,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7941 RequestMultipleObjectsPacket incomingRequest = (RequestMultipleObjectsPacket)Pack; 7773 RequestMultipleObjectsPacket incomingRequest = (RequestMultipleObjectsPacket)Pack;
7942 7774
7943 #region Packet Session and User Check 7775 #region Packet Session and User Check
7944 if (m_checkPackets) 7776 if (incomingRequest.AgentData.SessionID != SessionId ||
7945 {
7946 if (incomingRequest.AgentData.SessionID != SessionId ||
7947 incomingRequest.AgentData.AgentID != AgentId) 7777 incomingRequest.AgentData.AgentID != AgentId)
7948 return true; 7778 return true;
7949 }
7950 #endregion 7779 #endregion
7951 7780
7952 ObjectRequest handlerObjectRequest = null; 7781 ObjectRequest handlerObjectRequest = null;
@@ -7967,13 +7796,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7967 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; 7796 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack;
7968 7797
7969 #region Packet Session and User Check 7798 #region Packet Session and User Check
7970 if (m_checkPackets) 7799 if (incomingselect.AgentData.SessionID != SessionId ||
7971 {
7972 if (incomingselect.AgentData.SessionID != SessionId ||
7973 incomingselect.AgentData.AgentID != AgentId) 7800 incomingselect.AgentData.AgentID != AgentId)
7974 return true; 7801 return true;
7975 }
7976 #endregion 7802 #endregion
7803
7977 List<uint> thisSelection = new List<uint>(); 7804 List<uint> thisSelection = new List<uint>();
7978 ObjectSelect handlerObjectSelect = null; 7805 ObjectSelect handlerObjectSelect = null;
7979 uint objID; 7806 uint objID;
@@ -7996,12 +7823,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7996 ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack; 7823 ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack;
7997 7824
7998 #region Packet Session and User Check 7825 #region Packet Session and User Check
7999 if (m_checkPackets) 7826 if (incomingdeselect.AgentData.SessionID != SessionId ||
8000 {
8001 if (incomingdeselect.AgentData.SessionID != SessionId ||
8002 incomingdeselect.AgentData.AgentID != AgentId) 7827 incomingdeselect.AgentData.AgentID != AgentId)
8003 return true; 7828 return true;
8004 }
8005 #endregion 7829 #endregion
8006 7830
8007 ObjectDeselect handlerObjectDeselect = null; 7831 ObjectDeselect handlerObjectDeselect = null;
@@ -8025,15 +7849,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8025 ObjectPositionPacket position = (ObjectPositionPacket)Pack; 7849 ObjectPositionPacket position = (ObjectPositionPacket)Pack;
8026 7850
8027 #region Packet Session and User Check 7851 #region Packet Session and User Check
8028 if (m_checkPackets) 7852 if (position.AgentData.SessionID != SessionId ||
8029 {
8030 if (position.AgentData.SessionID != SessionId ||
8031 position.AgentData.AgentID != AgentId) 7853 position.AgentData.AgentID != AgentId)
8032 return true; 7854 return true;
8033 }
8034 #endregion 7855 #endregion
8035 7856
8036
8037 for (int i = 0; i < position.ObjectData.Length; i++) 7857 for (int i = 0; i < position.ObjectData.Length; i++)
8038 { 7858 {
8039 UpdateVector handlerUpdateVector = OnUpdatePrimGroupPosition; 7859 UpdateVector handlerUpdateVector = OnUpdatePrimGroupPosition;
@@ -8050,12 +7870,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8050 ObjectScalePacket scale = (ObjectScalePacket)Pack; 7870 ObjectScalePacket scale = (ObjectScalePacket)Pack;
8051 7871
8052 #region Packet Session and User Check 7872 #region Packet Session and User Check
8053 if (m_checkPackets) 7873 if (scale.AgentData.SessionID != SessionId ||
8054 {
8055 if (scale.AgentData.SessionID != SessionId ||
8056 scale.AgentData.AgentID != AgentId) 7874 scale.AgentData.AgentID != AgentId)
8057 return true; 7875 return true;
8058 }
8059 #endregion 7876 #endregion
8060 7877
8061 for (int i = 0; i < scale.ObjectData.Length; i++) 7878 for (int i = 0; i < scale.ObjectData.Length; i++)
@@ -8074,12 +7891,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8074 ObjectRotationPacket rotation = (ObjectRotationPacket)Pack; 7891 ObjectRotationPacket rotation = (ObjectRotationPacket)Pack;
8075 7892
8076 #region Packet Session and User Check 7893 #region Packet Session and User Check
8077 if (m_checkPackets) 7894 if (rotation.AgentData.SessionID != SessionId ||
8078 {
8079 if (rotation.AgentData.SessionID != SessionId ||
8080 rotation.AgentData.AgentID != AgentId) 7895 rotation.AgentData.AgentID != AgentId)
8081 return true; 7896 return true;
8082 }
8083 #endregion 7897 #endregion
8084 7898
8085 for (int i = 0; i < rotation.ObjectData.Length; i++) 7899 for (int i = 0; i < rotation.ObjectData.Length; i++)
@@ -8097,12 +7911,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8097 ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; 7911 ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack;
8098 7912
8099 #region Packet Session and User Check 7913 #region Packet Session and User Check
8100 if (m_checkPackets) 7914 if (flags.AgentData.SessionID != SessionId ||
8101 {
8102 if (flags.AgentData.SessionID != SessionId ||
8103 flags.AgentData.AgentID != AgentId) 7915 flags.AgentData.AgentID != AgentId)
8104 return true; 7916 return true;
8105 }
8106 #endregion 7917 #endregion
8107 7918
8108 UpdatePrimFlags handlerUpdatePrimFlags = OnUpdatePrimFlags; 7919 UpdatePrimFlags handlerUpdatePrimFlags = OnUpdatePrimFlags;
@@ -8188,12 +7999,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8188 ObjectGrabPacket grab = (ObjectGrabPacket)Pack; 7999 ObjectGrabPacket grab = (ObjectGrabPacket)Pack;
8189 8000
8190 #region Packet Session and User Check 8001 #region Packet Session and User Check
8191 if (m_checkPackets) 8002 if (grab.AgentData.SessionID != SessionId ||
8192 {
8193 if (grab.AgentData.SessionID != SessionId ||
8194 grab.AgentData.AgentID != AgentId) 8003 grab.AgentData.AgentID != AgentId)
8195 return true; 8004 return true;
8196 } 8005
8197 #endregion 8006 #endregion
8198 8007
8199 GrabObject handlerGrabObject = OnGrabObject; 8008 GrabObject handlerGrabObject = OnGrabObject;
@@ -8225,12 +8034,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8225 ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack; 8034 ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack;
8226 8035
8227 #region Packet Session and User Check 8036 #region Packet Session and User Check
8228 if (m_checkPackets) 8037 if (grabUpdate.AgentData.SessionID != SessionId ||
8229 {
8230 if (grabUpdate.AgentData.SessionID != SessionId ||
8231 grabUpdate.AgentData.AgentID != AgentId) 8038 grabUpdate.AgentData.AgentID != AgentId)
8232 return true; 8039 return true;
8233 }
8234 #endregion 8040 #endregion
8235 8041
8236 MoveObject handlerGrabUpdate = OnGrabUpdate; 8042 MoveObject handlerGrabUpdate = OnGrabUpdate;
@@ -8264,12 +8070,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8264 ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack; 8070 ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack;
8265 8071
8266 #region Packet Session and User Check 8072 #region Packet Session and User Check
8267 if (m_checkPackets) 8073 if (deGrab.AgentData.SessionID != SessionId ||
8268 {
8269 if (deGrab.AgentData.SessionID != SessionId ||
8270 deGrab.AgentData.AgentID != AgentId) 8074 deGrab.AgentData.AgentID != AgentId)
8271 return true; 8075 return true;
8272 }
8273 #endregion 8076 #endregion
8274 8077
8275 DeGrabObject handlerDeGrabObject = OnDeGrabObject; 8078 DeGrabObject handlerDeGrabObject = OnDeGrabObject;
@@ -8301,12 +8104,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8301 ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack; 8104 ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack;
8302 8105
8303 #region Packet Session and User Check 8106 #region Packet Session and User Check
8304 if (m_checkPackets) 8107 if (spinStart.AgentData.SessionID != SessionId ||
8305 {
8306 if (spinStart.AgentData.SessionID != SessionId ||
8307 spinStart.AgentData.AgentID != AgentId) 8108 spinStart.AgentData.AgentID != AgentId)
8308 return true; 8109 return true;
8309 }
8310 #endregion 8110 #endregion
8311 8111
8312 SpinStart handlerSpinStart = OnSpinStart; 8112 SpinStart handlerSpinStart = OnSpinStart;
@@ -8323,12 +8123,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8323 ObjectSpinUpdatePacket spinUpdate = (ObjectSpinUpdatePacket)Pack; 8123 ObjectSpinUpdatePacket spinUpdate = (ObjectSpinUpdatePacket)Pack;
8324 8124
8325 #region Packet Session and User Check 8125 #region Packet Session and User Check
8326 if (m_checkPackets) 8126 if (spinUpdate.AgentData.SessionID != SessionId ||
8327 {
8328 if (spinUpdate.AgentData.SessionID != SessionId ||
8329 spinUpdate.AgentData.AgentID != AgentId) 8127 spinUpdate.AgentData.AgentID != AgentId)
8330 return true; 8128 return true;
8331 }
8332 #endregion 8129 #endregion
8333 8130
8334 Vector3 axis; 8131 Vector3 axis;
@@ -8350,12 +8147,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8350 ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack; 8147 ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack;
8351 8148
8352 #region Packet Session and User Check 8149 #region Packet Session and User Check
8353 if (m_checkPackets) 8150 if (spinStop.AgentData.SessionID != SessionId ||
8354 {
8355 if (spinStop.AgentData.SessionID != SessionId ||
8356 spinStop.AgentData.AgentID != AgentId) 8151 spinStop.AgentData.AgentID != AgentId)
8357 return true; 8152 return true;
8358 }
8359 #endregion 8153 #endregion
8360 8154
8361 SpinStop handlerSpinStop = OnSpinStop; 8155 SpinStop handlerSpinStop = OnSpinStop;
@@ -8371,12 +8165,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8371 ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack; 8165 ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack;
8372 8166
8373 #region Packet Session and User Check 8167 #region Packet Session and User Check
8374 if (m_checkPackets) 8168 if (objDes.AgentData.SessionID != SessionId ||
8375 {
8376 if (objDes.AgentData.SessionID != SessionId ||
8377 objDes.AgentData.AgentID != AgentId) 8169 objDes.AgentData.AgentID != AgentId)
8378 return true; 8170 return true;
8379 } 8171
8380 #endregion 8172 #endregion
8381 8173
8382 GenericCall7 handlerObjectDescription = null; 8174 GenericCall7 handlerObjectDescription = null;
@@ -8398,12 +8190,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8398 ObjectNamePacket objName = (ObjectNamePacket)Pack; 8190 ObjectNamePacket objName = (ObjectNamePacket)Pack;
8399 8191
8400 #region Packet Session and User Check 8192 #region Packet Session and User Check
8401 if (m_checkPackets) 8193 if (objName.AgentData.SessionID != SessionId ||
8402 {
8403 if (objName.AgentData.SessionID != SessionId ||
8404 objName.AgentData.AgentID != AgentId) 8194 objName.AgentData.AgentID != AgentId)
8405 return true; 8195 return true;
8406 }
8407 #endregion 8196 #endregion
8408 8197
8409 GenericCall7 handlerObjectName = null; 8198 GenericCall7 handlerObjectName = null;
@@ -8426,12 +8215,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8426 ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; 8215 ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack;
8427 8216
8428 #region Packet Session and User Check 8217 #region Packet Session and User Check
8429 if (m_checkPackets) 8218 if (newobjPerms.AgentData.SessionID != SessionId ||
8430 {
8431 if (newobjPerms.AgentData.SessionID != SessionId ||
8432 newobjPerms.AgentData.AgentID != AgentId) 8219 newobjPerms.AgentData.AgentID != AgentId)
8433 return true; 8220 return true;
8434 }
8435 #endregion 8221 #endregion
8436 8222
8437 UUID AgentID = newobjPerms.AgentData.AgentID; 8223 UUID AgentID = newobjPerms.AgentData.AgentID;
@@ -8475,12 +8261,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8475 UndoPacket undoitem = (UndoPacket)Pack; 8261 UndoPacket undoitem = (UndoPacket)Pack;
8476 8262
8477 #region Packet Session and User Check 8263 #region Packet Session and User Check
8478 if (m_checkPackets) 8264 if (undoitem.AgentData.SessionID != SessionId ||
8479 {
8480 if (undoitem.AgentData.SessionID != SessionId ||
8481 undoitem.AgentData.AgentID != AgentId) 8265 undoitem.AgentData.AgentID != AgentId)
8482 return true; 8266 return true;
8483 }
8484 #endregion 8267 #endregion
8485 8268
8486 if (undoitem.ObjectData.Length > 0) 8269 if (undoitem.ObjectData.Length > 0)
@@ -8504,12 +8287,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8504 UndoLandPacket undolanditem = (UndoLandPacket)Pack; 8287 UndoLandPacket undolanditem = (UndoLandPacket)Pack;
8505 8288
8506 #region Packet Session and User Check 8289 #region Packet Session and User Check
8507 if (m_checkPackets) 8290 if (undolanditem.AgentData.SessionID != SessionId ||
8508 {
8509 if (undolanditem.AgentData.SessionID != SessionId ||
8510 undolanditem.AgentData.AgentID != AgentId) 8291 undolanditem.AgentData.AgentID != AgentId)
8511 return true; 8292 return true;
8512 }
8513 #endregion 8293 #endregion
8514 8294
8515 LandUndo handlerOnUndo = OnLandUndo; 8295 LandUndo handlerOnUndo = OnLandUndo;
@@ -8525,12 +8305,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8525 RedoPacket redoitem = (RedoPacket)Pack; 8305 RedoPacket redoitem = (RedoPacket)Pack;
8526 8306
8527 #region Packet Session and User Check 8307 #region Packet Session and User Check
8528 if (m_checkPackets) 8308 if (redoitem.AgentData.SessionID != SessionId ||
8529 {
8530 if (redoitem.AgentData.SessionID != SessionId ||
8531 redoitem.AgentData.AgentID != AgentId) 8309 redoitem.AgentData.AgentID != AgentId)
8532 return true; 8310 return true;
8533 }
8534 #endregion 8311 #endregion
8535 8312
8536 if (redoitem.ObjectData.Length > 0) 8313 if (redoitem.ObjectData.Length > 0)
@@ -8554,12 +8331,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8554 ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack; 8331 ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack;
8555 8332
8556 #region Packet Session and User Check 8333 #region Packet Session and User Check
8557 if (m_checkPackets) 8334 if (dupeOnRay.AgentData.SessionID != SessionId ||
8558 {
8559 if (dupeOnRay.AgentData.SessionID != SessionId ||
8560 dupeOnRay.AgentData.AgentID != AgentId) 8335 dupeOnRay.AgentData.AgentID != AgentId)
8561 return true; 8336 return true;
8562 }
8563 #endregion 8337 #endregion
8564 8338
8565 ObjectDuplicateOnRay handlerObjectDuplicateOnRay = null; 8339 ObjectDuplicateOnRay handlerObjectDuplicateOnRay = null;
@@ -8592,12 +8366,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8592 RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack; 8366 RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack;
8593 8367
8594 #region Packet Session and User Check 8368 #region Packet Session and User Check
8595 if (m_checkPackets) 8369 if (packToolTip.AgentData.SessionID != SessionId ||
8596 {
8597 if (packToolTip.AgentData.SessionID != SessionId ||
8598 packToolTip.AgentData.AgentID != AgentId) 8370 packToolTip.AgentData.AgentID != AgentId)
8599 return true; 8371 return true;
8600 }
8601 #endregion 8372 #endregion
8602 8373
8603 RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData; 8374 RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData;
@@ -8620,12 +8391,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8620 ObjectIncludeInSearch handlerObjectIncludeInSearch = null; 8391 ObjectIncludeInSearch handlerObjectIncludeInSearch = null;
8621 8392
8622 #region Packet Session and User Check 8393 #region Packet Session and User Check
8623 if (m_checkPackets) 8394 if (packInSearch.AgentData.SessionID != SessionId ||
8624 {
8625 if (packInSearch.AgentData.SessionID != SessionId ||
8626 packInSearch.AgentData.AgentID != AgentId) 8395 packInSearch.AgentData.AgentID != AgentId)
8627 return true; 8396 return true;
8628 }
8629 #endregion 8397 #endregion
8630 8398
8631 foreach (ObjectIncludeInSearchPacket.ObjectDataBlock objData in packInSearch.ObjectData) 8399 foreach (ObjectIncludeInSearchPacket.ObjectDataBlock objData in packInSearch.ObjectData)
@@ -8648,12 +8416,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8648 ScriptAnswerYesPacket scriptAnswer = (ScriptAnswerYesPacket)Pack; 8416 ScriptAnswerYesPacket scriptAnswer = (ScriptAnswerYesPacket)Pack;
8649 8417
8650 #region Packet Session and User Check 8418 #region Packet Session and User Check
8651 if (m_checkPackets) 8419 if (scriptAnswer.AgentData.SessionID != SessionId ||
8652 {
8653 if (scriptAnswer.AgentData.SessionID != SessionId ||
8654 scriptAnswer.AgentData.AgentID != AgentId) 8420 scriptAnswer.AgentData.AgentID != AgentId)
8655 return true; 8421 return true;
8656 }
8657 #endregion 8422 #endregion
8658 8423
8659 ScriptAnswer handlerScriptAnswer = OnScriptAnswer; 8424 ScriptAnswer handlerScriptAnswer = OnScriptAnswer;
@@ -8669,12 +8434,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8669 ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack; 8434 ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack;
8670 8435
8671 #region Packet Session and User Check 8436 #region Packet Session and User Check
8672 if (m_checkPackets) 8437 if (ocpacket.AgentData.SessionID != SessionId ||
8673 {
8674 if (ocpacket.AgentData.SessionID != SessionId ||
8675 ocpacket.AgentData.AgentID != AgentId) 8438 ocpacket.AgentData.AgentID != AgentId)
8676 return true; 8439 return true;
8677 }
8678 #endregion 8440 #endregion
8679 8441
8680 GenericCall7 handlerObjectClickAction = OnObjectClickAction; 8442 GenericCall7 handlerObjectClickAction = OnObjectClickAction;
@@ -8695,12 +8457,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8695 ObjectMaterialPacket ompacket = (ObjectMaterialPacket)Pack; 8457 ObjectMaterialPacket ompacket = (ObjectMaterialPacket)Pack;
8696 8458
8697 #region Packet Session and User Check 8459 #region Packet Session and User Check
8698 if (m_checkPackets) 8460 if (ompacket.AgentData.SessionID != SessionId ||
8699 {
8700 if (ompacket.AgentData.SessionID != SessionId ||
8701 ompacket.AgentData.AgentID != AgentId) 8461 ompacket.AgentData.AgentID != AgentId)
8702 return true; 8462 return true;
8703 }
8704 #endregion 8463 #endregion
8705 8464
8706 GenericCall7 handlerObjectMaterial = OnObjectMaterial; 8465 GenericCall7 handlerObjectMaterial = OnObjectMaterial;
@@ -8726,12 +8485,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8726 //m_log.Debug("image request: " + Pack.ToString()); 8485 //m_log.Debug("image request: " + Pack.ToString());
8727 8486
8728 #region Packet Session and User Check 8487 #region Packet Session and User Check
8729 if (m_checkPackets) 8488 if (imageRequest.AgentData.SessionID != SessionId ||
8730 {
8731 if (imageRequest.AgentData.SessionID != SessionId ||
8732 imageRequest.AgentData.AgentID != AgentId) 8489 imageRequest.AgentData.AgentID != AgentId)
8733 return true; 8490 return true;
8734 }
8735 #endregion 8491 #endregion
8736 8492
8737 //handlerTextureRequest = null; 8493 //handlerTextureRequest = null;
@@ -8985,12 +8741,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8985 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; 8741 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack;
8986 8742
8987 #region Packet Session and User Check 8743 #region Packet Session and User Check
8988 if (m_checkPackets) 8744 if (invFolder.AgentData.SessionID != SessionId ||
8989 {
8990 if (invFolder.AgentData.SessionID != SessionId ||
8991 invFolder.AgentData.AgentID != AgentId) 8745 invFolder.AgentData.AgentID != AgentId)
8992 return true; 8746 return true;
8993 }
8994 #endregion 8747 #endregion
8995 8748
8996 CreateInventoryFolder handlerCreateInventoryFolder = OnCreateNewInventoryFolder; 8749 CreateInventoryFolder handlerCreateInventoryFolder = OnCreateNewInventoryFolder;
@@ -9011,12 +8764,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9011 UpdateInventoryFolderPacket invFolderx = (UpdateInventoryFolderPacket)Pack; 8764 UpdateInventoryFolderPacket invFolderx = (UpdateInventoryFolderPacket)Pack;
9012 8765
9013 #region Packet Session and User Check 8766 #region Packet Session and User Check
9014 if (m_checkPackets) 8767 if (invFolderx.AgentData.SessionID != SessionId ||
9015 {
9016 if (invFolderx.AgentData.SessionID != SessionId ||
9017 invFolderx.AgentData.AgentID != AgentId) 8768 invFolderx.AgentData.AgentID != AgentId)
9018 return true; 8769 return true;
9019 }
9020 #endregion 8770 #endregion
9021 8771
9022 UpdateInventoryFolder handlerUpdateInventoryFolder = null; 8772 UpdateInventoryFolder handlerUpdateInventoryFolder = null;
@@ -9043,12 +8793,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9043 MoveInventoryFolderPacket invFoldery = (MoveInventoryFolderPacket)Pack; 8793 MoveInventoryFolderPacket invFoldery = (MoveInventoryFolderPacket)Pack;
9044 8794
9045 #region Packet Session and User Check 8795 #region Packet Session and User Check
9046 if (m_checkPackets) 8796 if (invFoldery.AgentData.SessionID != SessionId ||
9047 {
9048 if (invFoldery.AgentData.SessionID != SessionId ||
9049 invFoldery.AgentData.AgentID != AgentId) 8797 invFoldery.AgentData.AgentID != AgentId)
9050 return true; 8798 return true;
9051 }
9052 #endregion 8799 #endregion
9053 8800
9054 MoveInventoryFolder handlerMoveInventoryFolder = null; 8801 MoveInventoryFolder handlerMoveInventoryFolder = null;
@@ -9071,12 +8818,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9071 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; 8818 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
9072 8819
9073 #region Packet Session and User Check 8820 #region Packet Session and User Check
9074 if (m_checkPackets) 8821 if (createItem.AgentData.SessionID != SessionId ||
9075 {
9076 if (createItem.AgentData.SessionID != SessionId ||
9077 createItem.AgentData.AgentID != AgentId) 8822 createItem.AgentData.AgentID != AgentId)
9078 return true; 8823 return true;
9079 }
9080 #endregion 8824 #endregion
9081 8825
9082 CreateNewInventoryItem handlerCreateNewInventoryItem = OnCreateNewInventoryItem; 8826 CreateNewInventoryItem handlerCreateNewInventoryItem = OnCreateNewInventoryItem;
@@ -9101,12 +8845,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9101 LinkInventoryItemPacket createLink = (LinkInventoryItemPacket)Pack; 8845 LinkInventoryItemPacket createLink = (LinkInventoryItemPacket)Pack;
9102 8846
9103 #region Packet Session and User Check 8847 #region Packet Session and User Check
9104 if (m_checkPackets) 8848 if (createLink.AgentData.SessionID != SessionId ||
9105 {
9106 if (createLink.AgentData.SessionID != SessionId ||
9107 createLink.AgentData.AgentID != AgentId) 8849 createLink.AgentData.AgentID != AgentId)
9108 return true; 8850 return true;
9109 }
9110 #endregion 8851 #endregion
9111 8852
9112 LinkInventoryItem linkInventoryItem = OnLinkInventoryItem; 8853 LinkInventoryItem linkInventoryItem = OnLinkInventoryItem;
@@ -9135,12 +8876,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9135 FetchInventoryPacket FetchInventoryx = (FetchInventoryPacket)Pack; 8876 FetchInventoryPacket FetchInventoryx = (FetchInventoryPacket)Pack;
9136 8877
9137 #region Packet Session and User Check 8878 #region Packet Session and User Check
9138 if (m_checkPackets) 8879 if (FetchInventoryx.AgentData.SessionID != SessionId ||
9139 {
9140 if (FetchInventoryx.AgentData.SessionID != SessionId ||
9141 FetchInventoryx.AgentData.AgentID != AgentId) 8880 FetchInventoryx.AgentData.AgentID != AgentId)
9142 return true; 8881 return true;
9143 }
9144 #endregion 8882 #endregion
9145 8883
9146 FetchInventory handlerFetchInventory = null; 8884 FetchInventory handlerFetchInventory = null;
@@ -9164,12 +8902,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9164 FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; 8902 FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack;
9165 8903
9166 #region Packet Session and User Check 8904 #region Packet Session and User Check
9167 if (m_checkPackets) 8905 if (Fetch.AgentData.SessionID != SessionId ||
9168 {
9169 if (Fetch.AgentData.SessionID != SessionId ||
9170 Fetch.AgentData.AgentID != AgentId) 8906 Fetch.AgentData.AgentID != AgentId)
9171 return true; 8907 return true;
9172 }
9173 #endregion 8908 #endregion
9174 8909
9175 FetchInventoryDescendents handlerFetchInventoryDescendents = OnFetchInventoryDescendents; 8910 FetchInventoryDescendents handlerFetchInventoryDescendents = OnFetchInventoryDescendents;
@@ -9187,12 +8922,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9187 PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; 8922 PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack;
9188 8923
9189 #region Packet Session and User Check 8924 #region Packet Session and User Check
9190 if (m_checkPackets) 8925 if (Purge.AgentData.SessionID != SessionId ||
9191 {
9192 if (Purge.AgentData.SessionID != SessionId ||
9193 Purge.AgentData.AgentID != AgentId) 8926 Purge.AgentData.AgentID != AgentId)
9194 return true; 8927 return true;
9195 }
9196 #endregion 8928 #endregion
9197 8929
9198 PurgeInventoryDescendents handlerPurgeInventoryDescendents = OnPurgeInventoryDescendents; 8930 PurgeInventoryDescendents handlerPurgeInventoryDescendents = OnPurgeInventoryDescendents;
@@ -9208,12 +8940,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9208 UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack; 8940 UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack;
9209 8941
9210 #region Packet Session and User Check 8942 #region Packet Session and User Check
9211 if (m_checkPackets) 8943 if (inventoryItemUpdate.AgentData.SessionID != SessionId ||
9212 {
9213 if (inventoryItemUpdate.AgentData.SessionID != SessionId ||
9214 inventoryItemUpdate.AgentData.AgentID != AgentId) 8944 inventoryItemUpdate.AgentData.AgentID != AgentId)
9215 return true; 8945 return true;
9216 }
9217 #endregion 8946 #endregion
9218 8947
9219 if (OnUpdateInventoryItem != null) 8948 if (OnUpdateInventoryItem != null)
@@ -9255,12 +8984,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9255 CopyInventoryItemPacket copyitem = (CopyInventoryItemPacket)Pack; 8984 CopyInventoryItemPacket copyitem = (CopyInventoryItemPacket)Pack;
9256 8985
9257 #region Packet Session and User Check 8986 #region Packet Session and User Check
9258 if (m_checkPackets) 8987 if (copyitem.AgentData.SessionID != SessionId ||
9259 {
9260 if (copyitem.AgentData.SessionID != SessionId ||
9261 copyitem.AgentData.AgentID != AgentId) 8988 copyitem.AgentData.AgentID != AgentId)
9262 return true; 8989 return true;
9263 }
9264 #endregion 8990 #endregion
9265 8991
9266 CopyInventoryItem handlerCopyInventoryItem = null; 8992 CopyInventoryItem handlerCopyInventoryItem = null;
@@ -9285,12 +9011,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9285 MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack; 9011 MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack;
9286 9012
9287 #region Packet Session and User Check 9013 #region Packet Session and User Check
9288 if (m_checkPackets) 9014 if (moveitem.AgentData.SessionID != SessionId ||
9289 {
9290 if (moveitem.AgentData.SessionID != SessionId ||
9291 moveitem.AgentData.AgentID != AgentId) 9015 moveitem.AgentData.AgentID != AgentId)
9292 return true; 9016 return true;
9293 }
9294 #endregion 9017 #endregion
9295 9018
9296 if (OnMoveInventoryItem != null) 9019 if (OnMoveInventoryItem != null)
@@ -9321,12 +9044,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9321 RemoveInventoryItemPacket removeItem = (RemoveInventoryItemPacket)Pack; 9044 RemoveInventoryItemPacket removeItem = (RemoveInventoryItemPacket)Pack;
9322 9045
9323 #region Packet Session and User Check 9046 #region Packet Session and User Check
9324 if (m_checkPackets) 9047 if (removeItem.AgentData.SessionID != SessionId ||
9325 {
9326 if (removeItem.AgentData.SessionID != SessionId ||
9327 removeItem.AgentData.AgentID != AgentId) 9048 removeItem.AgentData.AgentID != AgentId)
9328 return true; 9049 return true;
9329 }
9330 #endregion 9050 #endregion
9331 9051
9332 if (OnRemoveInventoryItem != null) 9052 if (OnRemoveInventoryItem != null)
@@ -9352,12 +9072,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9352 RemoveInventoryFolderPacket removeFolder = (RemoveInventoryFolderPacket)Pack; 9072 RemoveInventoryFolderPacket removeFolder = (RemoveInventoryFolderPacket)Pack;
9353 9073
9354 #region Packet Session and User Check 9074 #region Packet Session and User Check
9355 if (m_checkPackets) 9075 if (removeFolder.AgentData.SessionID != SessionId ||
9356 {
9357 if (removeFolder.AgentData.SessionID != SessionId ||
9358 removeFolder.AgentData.AgentID != AgentId) 9076 removeFolder.AgentData.AgentID != AgentId)
9359 return true; 9077 return true;
9360 }
9361 #endregion 9078 #endregion
9362 9079
9363 if (OnRemoveInventoryFolder != null) 9080 if (OnRemoveInventoryFolder != null)
@@ -9381,13 +9098,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9381 { 9098 {
9382 RemoveInventoryObjectsPacket removeObject = (RemoveInventoryObjectsPacket)Pack; 9099 RemoveInventoryObjectsPacket removeObject = (RemoveInventoryObjectsPacket)Pack;
9383 #region Packet Session and User Check 9100 #region Packet Session and User Check
9384 if (m_checkPackets) 9101 if (removeObject.AgentData.SessionID != SessionId ||
9385 {
9386 if (removeObject.AgentData.SessionID != SessionId ||
9387 removeObject.AgentData.AgentID != AgentId) 9102 removeObject.AgentData.AgentID != AgentId)
9388 return true; 9103 return true;
9389 }
9390 #endregion 9104 #endregion
9105
9391 if (OnRemoveInventoryFolder != null) 9106 if (OnRemoveInventoryFolder != null)
9392 { 9107 {
9393 RemoveInventoryFolder handlerRemoveInventoryFolder = null; 9108 RemoveInventoryFolder handlerRemoveInventoryFolder = null;
@@ -9425,12 +9140,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9425 RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack; 9140 RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack;
9426 9141
9427 #region Packet Session and User Check 9142 #region Packet Session and User Check
9428 if (m_checkPackets) 9143 if (requesttask.AgentData.SessionID != SessionId ||
9429 {
9430 if (requesttask.AgentData.SessionID != SessionId ||
9431 requesttask.AgentData.AgentID != AgentId) 9144 requesttask.AgentData.AgentID != AgentId)
9432 return true; 9145 return true;
9433 }
9434 #endregion 9146 #endregion
9435 9147
9436 RequestTaskInventory handlerRequestTaskInventory = OnRequestTaskInventory; 9148 RequestTaskInventory handlerRequestTaskInventory = OnRequestTaskInventory;
@@ -9446,12 +9158,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9446 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; 9158 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
9447 9159
9448 #region Packet Session and User Check 9160 #region Packet Session and User Check
9449 if (m_checkPackets) 9161 if (updatetask.AgentData.SessionID != SessionId ||
9450 {
9451 if (updatetask.AgentData.SessionID != SessionId ||
9452 updatetask.AgentData.AgentID != AgentId) 9162 updatetask.AgentData.AgentID != AgentId)
9453 return true; 9163 return true;
9454 }
9455 #endregion 9164 #endregion
9456 9165
9457 if (OnUpdateTaskInventory != null) 9166 if (OnUpdateTaskInventory != null)
@@ -9498,12 +9207,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9498 RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack; 9207 RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack;
9499 9208
9500 #region Packet Session and User Check 9209 #region Packet Session and User Check
9501 if (m_checkPackets) 9210 if (removeTask.AgentData.SessionID != SessionId ||
9502 {
9503 if (removeTask.AgentData.SessionID != SessionId ||
9504 removeTask.AgentData.AgentID != AgentId) 9211 removeTask.AgentData.AgentID != AgentId)
9505 return true; 9212 return true;
9506 }
9507 #endregion 9213 #endregion
9508 9214
9509 RemoveTaskInventory handlerRemoveTaskItem = OnRemoveTaskItem; 9215 RemoveTaskInventory handlerRemoveTaskItem = OnRemoveTaskItem;
@@ -9521,12 +9227,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9521 MoveTaskInventoryPacket moveTaskInventoryPacket = (MoveTaskInventoryPacket)Pack; 9227 MoveTaskInventoryPacket moveTaskInventoryPacket = (MoveTaskInventoryPacket)Pack;
9522 9228
9523 #region Packet Session and User Check 9229 #region Packet Session and User Check
9524 if (m_checkPackets) 9230 if (moveTaskInventoryPacket.AgentData.SessionID != SessionId ||
9525 {
9526 if (moveTaskInventoryPacket.AgentData.SessionID != SessionId ||
9527 moveTaskInventoryPacket.AgentData.AgentID != AgentId) 9231 moveTaskInventoryPacket.AgentData.AgentID != AgentId)
9528 return true; 9232 return true;
9529 }
9530 #endregion 9233 #endregion
9531 9234
9532 MoveTaskInventory handlerMoveTaskItem = OnMoveTaskItem; 9235 MoveTaskInventory handlerMoveTaskItem = OnMoveTaskItem;
@@ -9548,12 +9251,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9548 RezScriptPacket rezScriptx = (RezScriptPacket)Pack; 9251 RezScriptPacket rezScriptx = (RezScriptPacket)Pack;
9549 9252
9550 #region Packet Session and User Check 9253 #region Packet Session and User Check
9551 if (m_checkPackets) 9254 if (rezScriptx.AgentData.SessionID != SessionId ||
9552 {
9553 if (rezScriptx.AgentData.SessionID != SessionId ||
9554 rezScriptx.AgentData.AgentID != AgentId) 9255 rezScriptx.AgentData.AgentID != AgentId)
9555 return true; 9256 return true;
9556 }
9557 #endregion 9257 #endregion
9558 9258
9559 RezScript handlerRezScript = OnRezScript; 9259 RezScript handlerRezScript = OnRezScript;
@@ -9596,12 +9296,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9596 MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack; 9296 MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack;
9597 9297
9598 #region Packet Session and User Check 9298 #region Packet Session and User Check
9599 if (m_checkPackets) 9299 if (MapRequest.AgentData.SessionID != SessionId ||
9600 {
9601 if (MapRequest.AgentData.SessionID != SessionId ||
9602 MapRequest.AgentData.AgentID != AgentId) 9300 MapRequest.AgentData.AgentID != AgentId)
9603 return true; 9301 return true;
9604 }
9605 #endregion 9302 #endregion
9606 9303
9607 RequestMapBlocks handlerRequestMapBlocks = OnRequestMapBlocks; 9304 RequestMapBlocks handlerRequestMapBlocks = OnRequestMapBlocks;
@@ -9618,13 +9315,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9618 MapNameRequestPacket map = (MapNameRequestPacket)Pack; 9315 MapNameRequestPacket map = (MapNameRequestPacket)Pack;
9619 9316
9620 #region Packet Session and User Check 9317 #region Packet Session and User Check
9621 if (m_checkPackets) 9318 if (map.AgentData.SessionID != SessionId ||
9622 {
9623 if (map.AgentData.SessionID != SessionId ||
9624 map.AgentData.AgentID != AgentId) 9319 map.AgentData.AgentID != AgentId)
9625 return true; 9320 return true;
9626 }
9627 #endregion 9321 #endregion
9322
9628 string mapName = (map.NameData.Name.Length == 0) ? m_scene.RegionInfo.RegionName : 9323 string mapName = (map.NameData.Name.Length == 0) ? m_scene.RegionInfo.RegionName :
9629 Util.UTF8.GetString(map.NameData.Name, 0, map.NameData.Name.Length - 1); 9324 Util.UTF8.GetString(map.NameData.Name, 0, map.NameData.Name.Length - 1);
9630 RequestMapName handlerMapNameRequest = OnMapNameRequest; 9325 RequestMapName handlerMapNameRequest = OnMapNameRequest;
@@ -9640,12 +9335,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9640 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; 9335 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
9641 9336
9642 #region Packet Session and User Check 9337 #region Packet Session and User Check
9643 if (m_checkPackets) 9338 if (tpReq.Info.SessionID != SessionId ||
9644 {
9645 if (tpReq.Info.SessionID != SessionId ||
9646 tpReq.Info.AgentID != AgentId) 9339 tpReq.Info.AgentID != AgentId)
9647 return true; 9340 return true;
9648 }
9649 #endregion 9341 #endregion
9650 9342
9651 UUID lmid = tpReq.Info.LandmarkID; 9343 UUID lmid = tpReq.Info.LandmarkID;
@@ -9744,12 +9436,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9744 // m_log.Debug(tpLocReq.ToString()); 9436 // m_log.Debug(tpLocReq.ToString());
9745 9437
9746 #region Packet Session and User Check 9438 #region Packet Session and User Check
9747 if (m_checkPackets) 9439 if (tpLocReq.AgentData.SessionID != SessionId ||
9748 {
9749 if (tpLocReq.AgentData.SessionID != SessionId ||
9750 tpLocReq.AgentData.AgentID != AgentId) 9440 tpLocReq.AgentData.AgentID != AgentId)
9751 return true; 9441 return true;
9752 }
9753 #endregion 9442 #endregion
9754 9443
9755 TeleportLocationRequest handlerTeleportLocationRequest = OnTeleportLocationRequest; 9444 TeleportLocationRequest handlerTeleportLocationRequest = OnTeleportLocationRequest;
@@ -9823,12 +9512,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9823 ParcelInfoRequestPacket pirPack = (ParcelInfoRequestPacket)Pack; 9512 ParcelInfoRequestPacket pirPack = (ParcelInfoRequestPacket)Pack;
9824 9513
9825 #region Packet Session and User Check 9514 #region Packet Session and User Check
9826 if (m_checkPackets) 9515 if (pirPack.AgentData.SessionID != SessionId ||
9827 {
9828 if (pirPack.AgentData.SessionID != SessionId ||
9829 pirPack.AgentData.AgentID != AgentId) 9516 pirPack.AgentData.AgentID != AgentId)
9830 return true; 9517 return true;
9831 }
9832 #endregion 9518 #endregion
9833 9519
9834 ParcelInfoRequest handlerParcelInfoRequest = OnParcelInfoRequest; 9520 ParcelInfoRequest handlerParcelInfoRequest = OnParcelInfoRequest;
@@ -9844,12 +9530,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9844 ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; 9530 ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack;
9845 9531
9846 #region Packet Session and User Check 9532 #region Packet Session and User Check
9847 if (m_checkPackets) 9533 if (requestPacket.AgentData.SessionID != SessionId ||
9848 {
9849 if (requestPacket.AgentData.SessionID != SessionId ||
9850 requestPacket.AgentData.AgentID != AgentId) 9534 requestPacket.AgentData.AgentID != AgentId)
9851 return true; 9535 return true;
9852 }
9853 #endregion 9536 #endregion
9854 9537
9855 ParcelAccessListRequest handlerParcelAccessListRequest = OnParcelAccessListRequest; 9538 ParcelAccessListRequest handlerParcelAccessListRequest = OnParcelAccessListRequest;
@@ -9865,17 +9548,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9865 9548
9866 private bool HandleParcelAccessListUpdate(IClientAPI sender, Packet Pack) 9549 private bool HandleParcelAccessListUpdate(IClientAPI sender, Packet Pack)
9867 { 9550 {
9551 if(OnParcelAccessListUpdateRequest == null)
9552 return true;
9553
9868 ParcelAccessListUpdatePacket updatePacket = (ParcelAccessListUpdatePacket)Pack; 9554 ParcelAccessListUpdatePacket updatePacket = (ParcelAccessListUpdatePacket)Pack;
9869 9555
9870 #region Packet Session and User Check 9556 #region Packet Session and User Check
9871 if (m_checkPackets) 9557 if (updatePacket.AgentData.SessionID != SessionId ||
9872 {
9873 if (updatePacket.AgentData.SessionID != SessionId ||
9874 updatePacket.AgentData.AgentID != AgentId) 9558 updatePacket.AgentData.AgentID != AgentId)
9875 return true; 9559 return true;
9876 }
9877 #endregion 9560 #endregion
9878 9561
9562 // viewers do send estimated number of packets and sequenceID, but don't seem reliable.
9879 List<LandAccessEntry> entries = new List<LandAccessEntry>(); 9563 List<LandAccessEntry> entries = new List<LandAccessEntry>();
9880 foreach (ParcelAccessListUpdatePacket.ListBlock block in updatePacket.List) 9564 foreach (ParcelAccessListUpdatePacket.ListBlock block in updatePacket.List)
9881 { 9565 {
@@ -9891,10 +9575,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9891 { 9575 {
9892 handlerParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID, 9576 handlerParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID,
9893 updatePacket.Data.Flags, 9577 updatePacket.Data.Flags,
9894 updatePacket.Data.LocalID,
9895 updatePacket.Data.TransactionID, 9578 updatePacket.Data.TransactionID,
9896 updatePacket.Data.SequenceID, 9579 updatePacket.Data.LocalID,
9897 updatePacket.Data.Sections,
9898 entries, this); 9580 entries, this);
9899 } 9581 }
9900 return true; 9582 return true;
@@ -9905,12 +9587,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9905 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; 9587 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack;
9906 9588
9907 #region Packet Session and User Check 9589 #region Packet Session and User Check
9908 if (m_checkPackets) 9590 if (propertiesRequest.AgentData.SessionID != SessionId ||
9909 {
9910 if (propertiesRequest.AgentData.SessionID != SessionId ||
9911 propertiesRequest.AgentData.AgentID != AgentId) 9591 propertiesRequest.AgentData.AgentID != AgentId)
9912 return true; 9592 return true;
9913 }
9914 #endregion 9593 #endregion
9915 9594
9916 ParcelPropertiesRequest handlerParcelPropertiesRequest = OnParcelPropertiesRequest; 9595 ParcelPropertiesRequest handlerParcelPropertiesRequest = OnParcelPropertiesRequest;
@@ -9931,12 +9610,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9931 ParcelDividePacket landDivide = (ParcelDividePacket)Pack; 9610 ParcelDividePacket landDivide = (ParcelDividePacket)Pack;
9932 9611
9933 #region Packet Session and User Check 9612 #region Packet Session and User Check
9934 if (m_checkPackets) 9613 if (landDivide.AgentData.SessionID != SessionId ||
9935 {
9936 if (landDivide.AgentData.SessionID != SessionId ||
9937 landDivide.AgentData.AgentID != AgentId) 9614 landDivide.AgentData.AgentID != AgentId)
9938 return true; 9615 return true;
9939 }
9940 #endregion 9616 #endregion
9941 9617
9942 ParcelDivideRequest handlerParcelDivideRequest = OnParcelDivideRequest; 9618 ParcelDivideRequest handlerParcelDivideRequest = OnParcelDivideRequest;
@@ -9955,12 +9631,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9955 ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack; 9631 ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack;
9956 9632
9957 #region Packet Session and User Check 9633 #region Packet Session and User Check
9958 if (m_checkPackets) 9634 if (landJoin.AgentData.SessionID != SessionId ||
9959 {
9960 if (landJoin.AgentData.SessionID != SessionId ||
9961 landJoin.AgentData.AgentID != AgentId) 9635 landJoin.AgentData.AgentID != AgentId)
9962 return true; 9636 return true;
9963 }
9964 #endregion 9637 #endregion
9965 9638
9966 ParcelJoinRequest handlerParcelJoinRequest = OnParcelJoinRequest; 9639 ParcelJoinRequest handlerParcelJoinRequest = OnParcelJoinRequest;
@@ -9980,12 +9653,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9980 ParcelPropertiesUpdatePacket parcelPropertiesPacket = (ParcelPropertiesUpdatePacket)Pack; 9653 ParcelPropertiesUpdatePacket parcelPropertiesPacket = (ParcelPropertiesUpdatePacket)Pack;
9981 9654
9982 #region Packet Session and User Check 9655 #region Packet Session and User Check
9983 if (m_checkPackets) 9656 if (parcelPropertiesPacket.AgentData.SessionID != SessionId ||
9984 {
9985 if (parcelPropertiesPacket.AgentData.SessionID != SessionId ||
9986 parcelPropertiesPacket.AgentData.AgentID != AgentId) 9657 parcelPropertiesPacket.AgentData.AgentID != AgentId)
9987 return true; 9658 return true;
9988 }
9989 #endregion 9659 #endregion
9990 9660
9991 ParcelPropertiesUpdateRequest handlerParcelPropertiesUpdateRequest = OnParcelPropertiesUpdateRequest; 9661 ParcelPropertiesUpdateRequest handlerParcelPropertiesUpdateRequest = OnParcelPropertiesUpdateRequest;
@@ -10021,12 +9691,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10021 ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack; 9691 ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack;
10022 9692
10023 #region Packet Session and User Check 9693 #region Packet Session and User Check
10024 if (m_checkPackets) 9694 if (selectPacket.AgentData.SessionID != SessionId ||
10025 {
10026 if (selectPacket.AgentData.SessionID != SessionId ||
10027 selectPacket.AgentData.AgentID != AgentId) 9695 selectPacket.AgentData.AgentID != AgentId)
10028 return true; 9696 return true;
10029 }
10030 #endregion 9697 #endregion
10031 9698
10032 List<UUID> returnIDs = new List<UUID>(); 9699 List<UUID> returnIDs = new List<UUID>();
@@ -10052,12 +9719,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10052 ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack; 9719 ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack;
10053 9720
10054 #region Packet Session and User Check 9721 #region Packet Session and User Check
10055 if (m_checkPackets) 9722 if (reqPacket.AgentData.SessionID != SessionId ||
10056 {
10057 if (reqPacket.AgentData.SessionID != SessionId ||
10058 reqPacket.AgentData.AgentID != AgentId) 9723 reqPacket.AgentData.AgentID != AgentId)
10059 return true; 9724 return true;
10060 }
10061 #endregion 9725 #endregion
10062 9726
10063 ParcelObjectOwnerRequest handlerParcelObjectOwnerRequest = OnParcelObjectOwnerRequest; 9727 ParcelObjectOwnerRequest handlerParcelObjectOwnerRequest = OnParcelObjectOwnerRequest;
@@ -10075,12 +9739,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10075 ParcelGodForceOwnerPacket godForceOwnerPacket = (ParcelGodForceOwnerPacket)Pack; 9739 ParcelGodForceOwnerPacket godForceOwnerPacket = (ParcelGodForceOwnerPacket)Pack;
10076 9740
10077 #region Packet Session and User Check 9741 #region Packet Session and User Check
10078 if (m_checkPackets) 9742 if (godForceOwnerPacket.AgentData.SessionID != SessionId ||
10079 {
10080 if (godForceOwnerPacket.AgentData.SessionID != SessionId ||
10081 godForceOwnerPacket.AgentData.AgentID != AgentId) 9743 godForceOwnerPacket.AgentData.AgentID != AgentId)
10082 return true; 9744 return true;
10083 }
10084 #endregion 9745 #endregion
10085 9746
10086 ParcelGodForceOwner handlerParcelGodForceOwner = OnParcelGodForceOwner; 9747 ParcelGodForceOwner handlerParcelGodForceOwner = OnParcelGodForceOwner;
@@ -10096,12 +9757,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10096 ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack; 9757 ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack;
10097 9758
10098 #region Packet Session and User Check 9759 #region Packet Session and User Check
10099 if (m_checkPackets) 9760 if (releasePacket.AgentData.SessionID != SessionId ||
10100 {
10101 if (releasePacket.AgentData.SessionID != SessionId ||
10102 releasePacket.AgentData.AgentID != AgentId) 9761 releasePacket.AgentData.AgentID != AgentId)
10103 return true; 9762 return true;
10104 }
10105 #endregion 9763 #endregion
10106 9764
10107 ParcelAbandonRequest handlerParcelAbandonRequest = OnParcelAbandonRequest; 9765 ParcelAbandonRequest handlerParcelAbandonRequest = OnParcelAbandonRequest;
@@ -10117,12 +9775,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10117 ParcelReclaimPacket reclaimPacket = (ParcelReclaimPacket)Pack; 9775 ParcelReclaimPacket reclaimPacket = (ParcelReclaimPacket)Pack;
10118 9776
10119 #region Packet Session and User Check 9777 #region Packet Session and User Check
10120 if (m_checkPackets) 9778 if (reclaimPacket.AgentData.SessionID != SessionId ||
10121 {
10122 if (reclaimPacket.AgentData.SessionID != SessionId ||
10123 reclaimPacket.AgentData.AgentID != AgentId) 9779 reclaimPacket.AgentData.AgentID != AgentId)
10124 return true; 9780 return true;
10125 }
10126 #endregion 9781 #endregion
10127 9782
10128 ParcelReclaim handlerParcelReclaim = OnParcelReclaim; 9783 ParcelReclaim handlerParcelReclaim = OnParcelReclaim;
@@ -10138,12 +9793,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10138 ParcelReturnObjectsPacket parcelReturnObjects = (ParcelReturnObjectsPacket)Pack; 9793 ParcelReturnObjectsPacket parcelReturnObjects = (ParcelReturnObjectsPacket)Pack;
10139 9794
10140 #region Packet Session and User Check 9795 #region Packet Session and User Check
10141 if (m_checkPackets) 9796 if (parcelReturnObjects.AgentData.SessionID != SessionId ||
10142 {
10143 if (parcelReturnObjects.AgentData.SessionID != SessionId ||
10144 parcelReturnObjects.AgentData.AgentID != AgentId) 9797 parcelReturnObjects.AgentData.AgentID != AgentId)
10145 return true; 9798 return true;
10146 }
10147 #endregion 9799 #endregion
10148 9800
10149 UUID[] puserselectedOwnerIDs = new UUID[parcelReturnObjects.OwnerIDs.Length]; 9801 UUID[] puserselectedOwnerIDs = new UUID[parcelReturnObjects.OwnerIDs.Length];
@@ -10169,12 +9821,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10169 ParcelSetOtherCleanTimePacket parcelSetOtherCleanTimePacket = (ParcelSetOtherCleanTimePacket)Pack; 9821 ParcelSetOtherCleanTimePacket parcelSetOtherCleanTimePacket = (ParcelSetOtherCleanTimePacket)Pack;
10170 9822
10171 #region Packet Session and User Check 9823 #region Packet Session and User Check
10172 if (m_checkPackets) 9824 if (parcelSetOtherCleanTimePacket.AgentData.SessionID != SessionId ||
10173 {
10174 if (parcelSetOtherCleanTimePacket.AgentData.SessionID != SessionId ||
10175 parcelSetOtherCleanTimePacket.AgentData.AgentID != AgentId) 9825 parcelSetOtherCleanTimePacket.AgentData.AgentID != AgentId)
10176 return true; 9826 return true;
10177 }
10178 #endregion 9827 #endregion
10179 9828
10180 ParcelSetOtherCleanTime handlerParcelSetOtherCleanTime = OnParcelSetOtherCleanTime; 9829 ParcelSetOtherCleanTime handlerParcelSetOtherCleanTime = OnParcelSetOtherCleanTime;
@@ -10192,12 +9841,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10192 LandStatRequestPacket lsrp = (LandStatRequestPacket)Pack; 9841 LandStatRequestPacket lsrp = (LandStatRequestPacket)Pack;
10193 9842
10194 #region Packet Session and User Check 9843 #region Packet Session and User Check
10195 if (m_checkPackets) 9844 if (lsrp.AgentData.SessionID != SessionId ||
10196 {
10197 if (lsrp.AgentData.SessionID != SessionId ||
10198 lsrp.AgentData.AgentID != AgentId) 9845 lsrp.AgentData.AgentID != AgentId)
10199 return true; 9846 return true;
10200 }
10201 #endregion 9847 #endregion
10202 9848
10203 GodLandStatRequest handlerLandStatRequest = OnLandStatRequest; 9849 GodLandStatRequest handlerLandStatRequest = OnLandStatRequest;
@@ -10214,12 +9860,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10214 (ParcelDwellRequestPacket)Pack; 9860 (ParcelDwellRequestPacket)Pack;
10215 9861
10216 #region Packet Session and User Check 9862 #region Packet Session and User Check
10217 if (m_checkPackets) 9863 if (dwellrq.AgentData.SessionID != SessionId ||
10218 {
10219 if (dwellrq.AgentData.SessionID != SessionId ||
10220 dwellrq.AgentData.AgentID != AgentId) 9864 dwellrq.AgentData.AgentID != AgentId)
10221 return true; 9865 return true;
10222 }
10223 #endregion 9866 #endregion
10224 9867
10225 ParcelDwellRequest handlerParcelDwellRequest = OnParcelDwellRequest; 9868 ParcelDwellRequest handlerParcelDwellRequest = OnParcelDwellRequest;
@@ -10241,12 +9884,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10241 GodLandStatRequest handlerLandStatRequest; 9884 GodLandStatRequest handlerLandStatRequest;
10242 9885
10243 #region Packet Session and User Check 9886 #region Packet Session and User Check
10244 if (m_checkPackets) 9887 if (messagePacket.AgentData.SessionID != SessionId ||
10245 {
10246 if (messagePacket.AgentData.SessionID != SessionId ||
10247 messagePacket.AgentData.AgentID != AgentId) 9888 messagePacket.AgentData.AgentID != AgentId)
10248 return true; 9889 return true;
10249 }
10250 #endregion 9890 #endregion
10251 9891
10252 string method = Utils.BytesToString(messagePacket.MethodData.Method); 9892 string method = Utils.BytesToString(messagePacket.MethodData.Method);
@@ -10609,12 +10249,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10609 RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; 10249 RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData;
10610 10250
10611 #region Packet Session and User Check 10251 #region Packet Session and User Check
10612 if (m_checkPackets) 10252 if (mPacket.SessionID != SessionId ||
10613 {
10614 if (mPacket.SessionID != SessionId ||
10615 mPacket.AgentID != AgentId) 10253 mPacket.AgentID != AgentId)
10616 return true; 10254 return true;
10617 }
10618 #endregion 10255 #endregion
10619 10256
10620 RegionInfoRequest handlerRegionInfoRequest = OnRegionInfoRequest; 10257 RegionInfoRequest handlerRegionInfoRequest = OnRegionInfoRequest;
@@ -10768,12 +10405,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10768 MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; 10405 MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
10769 10406
10770 #region Packet Session and User Check 10407 #region Packet Session and User Check
10771 if (m_checkPackets) 10408 if (moneybalancerequestpacket.AgentData.SessionID != SessionId ||
10772 {
10773 if (moneybalancerequestpacket.AgentData.SessionID != SessionId ||
10774 moneybalancerequestpacket.AgentData.AgentID != AgentId) 10409 moneybalancerequestpacket.AgentData.AgentID != AgentId)
10775 return true; 10410 return true;
10776 }
10777 #endregion 10411 #endregion
10778 10412
10779 MoneyBalanceRequest handlerMoneyBalanceRequest = OnMoneyBalanceRequest; 10413 MoneyBalanceRequest handlerMoneyBalanceRequest = OnMoneyBalanceRequest;
@@ -10810,12 +10444,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10810 ObjectSaleInfoPacket objectSaleInfoPacket = (ObjectSaleInfoPacket)Pack; 10444 ObjectSaleInfoPacket objectSaleInfoPacket = (ObjectSaleInfoPacket)Pack;
10811 10445
10812 #region Packet Session and User Check 10446 #region Packet Session and User Check
10813 if (m_checkPackets) 10447 if (objectSaleInfoPacket.AgentData.SessionID != SessionId ||
10814 {
10815 if (objectSaleInfoPacket.AgentData.SessionID != SessionId ||
10816 objectSaleInfoPacket.AgentData.AgentID != AgentId) 10448 objectSaleInfoPacket.AgentData.AgentID != AgentId)
10817 return true; 10449 return true;
10818 }
10819 #endregion 10450 #endregion
10820 10451
10821 ObjectSaleInfo handlerObjectSaleInfo = OnObjectSaleInfo; 10452 ObjectSaleInfo handlerObjectSaleInfo = OnObjectSaleInfo;
@@ -10839,12 +10470,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10839 ObjectBuyPacket objectBuyPacket = (ObjectBuyPacket)Pack; 10470 ObjectBuyPacket objectBuyPacket = (ObjectBuyPacket)Pack;
10840 10471
10841 #region Packet Session and User Check 10472 #region Packet Session and User Check
10842 if (m_checkPackets) 10473 if (objectBuyPacket.AgentData.SessionID != SessionId ||
10843 {
10844 if (objectBuyPacket.AgentData.SessionID != SessionId ||
10845 objectBuyPacket.AgentData.AgentID != AgentId) 10474 objectBuyPacket.AgentData.AgentID != AgentId)
10846 return true; 10475 return true;
10847 }
10848 #endregion 10476 #endregion
10849 10477
10850 ObjectBuy handlerObjectBuy = OnObjectBuy; 10478 ObjectBuy handlerObjectBuy = OnObjectBuy;
@@ -10886,12 +10514,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10886 SetScriptRunningPacket setScriptRunning = (SetScriptRunningPacket)Pack; 10514 SetScriptRunningPacket setScriptRunning = (SetScriptRunningPacket)Pack;
10887 10515
10888 #region Packet Session and User Check 10516 #region Packet Session and User Check
10889 if (m_checkPackets) 10517 if (setScriptRunning.AgentData.SessionID != SessionId ||
10890 {
10891 if (setScriptRunning.AgentData.SessionID != SessionId ||
10892 setScriptRunning.AgentData.AgentID != AgentId) 10518 setScriptRunning.AgentData.AgentID != AgentId)
10893 return true; 10519 return true;
10894 }
10895 #endregion 10520 #endregion
10896 10521
10897 SetScriptRunning handlerSetScriptRunning = OnSetScriptRunning; 10522 SetScriptRunning handlerSetScriptRunning = OnSetScriptRunning;
@@ -10907,12 +10532,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10907 ScriptResetPacket scriptResetPacket = (ScriptResetPacket)Pack; 10532 ScriptResetPacket scriptResetPacket = (ScriptResetPacket)Pack;
10908 10533
10909 #region Packet Session and User Check 10534 #region Packet Session and User Check
10910 if (m_checkPackets) 10535 if (scriptResetPacket.AgentData.SessionID != SessionId ||
10911 {
10912 if (scriptResetPacket.AgentData.SessionID != SessionId ||
10913 scriptResetPacket.AgentData.AgentID != AgentId) 10536 scriptResetPacket.AgentData.AgentID != AgentId)
10914 return true; 10537 return true;
10915 }
10916 #endregion 10538 #endregion
10917 10539
10918 ScriptReset handlerScriptReset = OnScriptReset; 10540 ScriptReset handlerScriptReset = OnScriptReset;
@@ -10932,12 +10554,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10932 ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack; 10554 ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
10933 10555
10934 #region Packet Session and User Check 10556 #region Packet Session and User Check
10935 if (m_checkPackets) 10557 if (activateGesturePacket.AgentData.SessionID != SessionId ||
10936 {
10937 if (activateGesturePacket.AgentData.SessionID != SessionId ||
10938 activateGesturePacket.AgentData.AgentID != AgentId) 10558 activateGesturePacket.AgentData.AgentID != AgentId)
10939 return true; 10559 return true;
10940 }
10941 #endregion 10560 #endregion
10942 10561
10943 ActivateGesture handlerActivateGesture = OnActivateGesture; 10562 ActivateGesture handlerActivateGesture = OnActivateGesture;
@@ -10956,12 +10575,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10956 DeactivateGesturesPacket deactivateGesturePacket = (DeactivateGesturesPacket)Pack; 10575 DeactivateGesturesPacket deactivateGesturePacket = (DeactivateGesturesPacket)Pack;
10957 10576
10958 #region Packet Session and User Check 10577 #region Packet Session and User Check
10959 if (m_checkPackets) 10578 if (deactivateGesturePacket.AgentData.SessionID != SessionId ||
10960 {
10961 if (deactivateGesturePacket.AgentData.SessionID != SessionId ||
10962 deactivateGesturePacket.AgentData.AgentID != AgentId) 10579 deactivateGesturePacket.AgentData.AgentID != AgentId)
10963 return true; 10580 return true;
10964 }
10965 #endregion 10581 #endregion
10966 10582
10967 DeactivateGesture handlerDeactivateGesture = OnDeactivateGesture; 10583 DeactivateGesture handlerDeactivateGesture = OnDeactivateGesture;
@@ -10976,12 +10592,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10976 ObjectOwnerPacket objectOwnerPacket = (ObjectOwnerPacket)Pack; 10592 ObjectOwnerPacket objectOwnerPacket = (ObjectOwnerPacket)Pack;
10977 10593
10978 #region Packet Session and User Check 10594 #region Packet Session and User Check
10979 if (m_checkPackets) 10595 if (objectOwnerPacket.AgentData.SessionID != SessionId ||
10980 {
10981 if (objectOwnerPacket.AgentData.SessionID != SessionId ||
10982 objectOwnerPacket.AgentData.AgentID != AgentId) 10596 objectOwnerPacket.AgentData.AgentID != AgentId)
10983 return true; 10597 return true;
10984 }
10985 #endregion 10598 #endregion
10986 10599
10987 List<uint> localIDs = new List<uint>(); 10600 List<uint> localIDs = new List<uint>();
@@ -11029,12 +10642,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11029 MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack; 10642 MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack;
11030 10643
11031 #region Packet Session and User Check 10644 #region Packet Session and User Check
11032 if (m_checkPackets) 10645 if (mirpk.AgentData.SessionID != SessionId ||
11033 {
11034 if (mirpk.AgentData.SessionID != SessionId ||
11035 mirpk.AgentData.AgentID != AgentId) 10646 mirpk.AgentData.AgentID != AgentId)
11036 return true; 10647 return true;
11037 }
11038 #endregion 10648 #endregion
11039 10649
11040 //m_log.Debug(mirpk.ToString()); 10650 //m_log.Debug(mirpk.ToString());
@@ -11060,12 +10670,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11060 (MuteListRequestPacket)Pack; 10670 (MuteListRequestPacket)Pack;
11061 10671
11062 #region Packet Session and User Check 10672 #region Packet Session and User Check
11063 if (m_checkPackets) 10673 if (muteListRequest.AgentData.SessionID != SessionId ||
11064 {
11065 if (muteListRequest.AgentData.SessionID != SessionId ||
11066 muteListRequest.AgentData.AgentID != AgentId) 10674 muteListRequest.AgentData.AgentID != AgentId)
11067 return true; 10675 return true;
11068 }
11069 #endregion 10676 #endregion
11070 10677
11071 MuteListRequest handlerMuteListRequest = OnMuteListRequest; 10678 MuteListRequest handlerMuteListRequest = OnMuteListRequest;
@@ -11176,13 +10783,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11176 CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack; 10783 CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack;
11177 10784
11178 #region Packet Session and User Check 10785 #region Packet Session and User Check
11179 if (m_checkPackets) 10786 if (packet.AgentData.SessionID != SessionId ||
11180 {
11181 if (packet.AgentData.SessionID != SessionId ||
11182 packet.AgentData.AgentID != AgentId) 10787 packet.AgentData.AgentID != AgentId)
11183 return true; 10788 return true;
11184 }
11185 #endregion 10789 #endregion
10790
11186 MoveItemsAndLeaveCopy handlerMoveItemsAndLeaveCopy = null; 10791 MoveItemsAndLeaveCopy handlerMoveItemsAndLeaveCopy = null;
11187 List<InventoryItemBase> items = new List<InventoryItemBase>(); 10792 List<InventoryItemBase> items = new List<InventoryItemBase>();
11188 foreach (CreateNewOutfitAttachmentsPacket.ObjectDataBlock n in packet.ObjectData) 10793 foreach (CreateNewOutfitAttachmentsPacket.ObjectDataBlock n in packet.ObjectData)
@@ -11223,12 +10828,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11223 //m_log.Debug(dirPlacesQueryPacket.ToString()); 10828 //m_log.Debug(dirPlacesQueryPacket.ToString());
11224 10829
11225 #region Packet Session and User Check 10830 #region Packet Session and User Check
11226 if (m_checkPackets) 10831 if (dirPlacesQueryPacket.AgentData.SessionID != SessionId ||
11227 {
11228 if (dirPlacesQueryPacket.AgentData.SessionID != SessionId ||
11229 dirPlacesQueryPacket.AgentData.AgentID != AgentId) 10832 dirPlacesQueryPacket.AgentData.AgentID != AgentId)
11230 return true; 10833 return true;
11231 }
11232 #endregion 10834 #endregion
11233 10835
11234 DirPlacesQuery handlerDirPlacesQuery = OnDirPlacesQuery; 10836 DirPlacesQuery handlerDirPlacesQuery = OnDirPlacesQuery;
@@ -11252,12 +10854,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11252 DirFindQueryPacket dirFindQueryPacket = (DirFindQueryPacket)Pack; 10854 DirFindQueryPacket dirFindQueryPacket = (DirFindQueryPacket)Pack;
11253 10855
11254 #region Packet Session and User Check 10856 #region Packet Session and User Check
11255 if (m_checkPackets) 10857 if (dirFindQueryPacket.AgentData.SessionID != SessionId ||
11256 {
11257 if (dirFindQueryPacket.AgentData.SessionID != SessionId ||
11258 dirFindQueryPacket.AgentData.AgentID != AgentId) 10858 dirFindQueryPacket.AgentData.AgentID != AgentId)
11259 return true; 10859 return true;
11260 }
11261 #endregion 10860 #endregion
11262 10861
11263 DirFindQuery handlerDirFindQuery = OnDirFindQuery; 10862 DirFindQuery handlerDirFindQuery = OnDirFindQuery;
@@ -11278,12 +10877,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11278 DirLandQueryPacket dirLandQueryPacket = (DirLandQueryPacket)Pack; 10877 DirLandQueryPacket dirLandQueryPacket = (DirLandQueryPacket)Pack;
11279 10878
11280 #region Packet Session and User Check 10879 #region Packet Session and User Check
11281 if (m_checkPackets) 10880 if (dirLandQueryPacket.AgentData.SessionID != SessionId ||
11282 {
11283 if (dirLandQueryPacket.AgentData.SessionID != SessionId ||
11284 dirLandQueryPacket.AgentData.AgentID != AgentId) 10881 dirLandQueryPacket.AgentData.AgentID != AgentId)
11285 return true; 10882 return true;
11286 }
11287 #endregion 10883 #endregion
11288 10884
11289 DirLandQuery handlerDirLandQuery = OnDirLandQuery; 10885 DirLandQuery handlerDirLandQuery = OnDirLandQuery;
@@ -11305,12 +10901,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11305 DirPopularQueryPacket dirPopularQueryPacket = (DirPopularQueryPacket)Pack; 10901 DirPopularQueryPacket dirPopularQueryPacket = (DirPopularQueryPacket)Pack;
11306 10902
11307 #region Packet Session and User Check 10903 #region Packet Session and User Check
11308 if (m_checkPackets) 10904 if (dirPopularQueryPacket.AgentData.SessionID != SessionId ||
11309 {
11310 if (dirPopularQueryPacket.AgentData.SessionID != SessionId ||
11311 dirPopularQueryPacket.AgentData.AgentID != AgentId) 10905 dirPopularQueryPacket.AgentData.AgentID != AgentId)
11312 return true; 10906 return true;
11313 }
11314 #endregion 10907 #endregion
11315 10908
11316 DirPopularQuery handlerDirPopularQuery = OnDirPopularQuery; 10909 DirPopularQuery handlerDirPopularQuery = OnDirPopularQuery;
@@ -11328,12 +10921,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11328 DirClassifiedQueryPacket dirClassifiedQueryPacket = (DirClassifiedQueryPacket)Pack; 10921 DirClassifiedQueryPacket dirClassifiedQueryPacket = (DirClassifiedQueryPacket)Pack;
11329 10922
11330 #region Packet Session and User Check 10923 #region Packet Session and User Check
11331 if (m_checkPackets) 10924 if (dirClassifiedQueryPacket.AgentData.SessionID != SessionId ||
11332 {
11333 if (dirClassifiedQueryPacket.AgentData.SessionID != SessionId ||
11334 dirClassifiedQueryPacket.AgentData.AgentID != AgentId) 10925 dirClassifiedQueryPacket.AgentData.AgentID != AgentId)
11335 return true; 10926 return true;
11336 }
11337 #endregion 10927 #endregion
11338 10928
11339 DirClassifiedQuery handlerDirClassifiedQuery = OnDirClassifiedQuery; 10929 DirClassifiedQuery handlerDirClassifiedQuery = OnDirClassifiedQuery;
@@ -11355,12 +10945,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11355 EventInfoRequestPacket eventInfoRequestPacket = (EventInfoRequestPacket)Pack; 10945 EventInfoRequestPacket eventInfoRequestPacket = (EventInfoRequestPacket)Pack;
11356 10946
11357 #region Packet Session and User Check 10947 #region Packet Session and User Check
11358 if (m_checkPackets) 10948 if (eventInfoRequestPacket.AgentData.SessionID != SessionId ||
11359 {
11360 if (eventInfoRequestPacket.AgentData.SessionID != SessionId ||
11361 eventInfoRequestPacket.AgentData.AgentID != AgentId) 10949 eventInfoRequestPacket.AgentData.AgentID != AgentId)
11362 return true; 10950 return true;
11363 }
11364 #endregion 10951 #endregion
11365 10952
11366 if (OnEventInfoRequest != null) 10953 if (OnEventInfoRequest != null)
@@ -11379,12 +10966,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11379 OfferCallingCardPacket offerCallingCardPacket = (OfferCallingCardPacket)Pack; 10966 OfferCallingCardPacket offerCallingCardPacket = (OfferCallingCardPacket)Pack;
11380 10967
11381 #region Packet Session and User Check 10968 #region Packet Session and User Check
11382 if (m_checkPackets) 10969 if (offerCallingCardPacket.AgentData.SessionID != SessionId ||
11383 {
11384 if (offerCallingCardPacket.AgentData.SessionID != SessionId ||
11385 offerCallingCardPacket.AgentData.AgentID != AgentId) 10970 offerCallingCardPacket.AgentData.AgentID != AgentId)
11386 return true; 10971 return true;
11387 }
11388 #endregion 10972 #endregion
11389 10973
11390 if (OnOfferCallingCard != null) 10974 if (OnOfferCallingCard != null)
@@ -11401,12 +10985,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11401 AcceptCallingCardPacket acceptCallingCardPacket = (AcceptCallingCardPacket)Pack; 10985 AcceptCallingCardPacket acceptCallingCardPacket = (AcceptCallingCardPacket)Pack;
11402 10986
11403 #region Packet Session and User Check 10987 #region Packet Session and User Check
11404 if (m_checkPackets) 10988 if (acceptCallingCardPacket.AgentData.SessionID != SessionId ||
11405 {
11406 if (acceptCallingCardPacket.AgentData.SessionID != SessionId ||
11407 acceptCallingCardPacket.AgentData.AgentID != AgentId) 10989 acceptCallingCardPacket.AgentData.AgentID != AgentId)
11408 return true; 10990 return true;
11409 }
11410 #endregion 10991 #endregion
11411 10992
11412 // according to http://wiki.secondlife.com/wiki/AcceptCallingCard FolderData should 10993 // according to http://wiki.secondlife.com/wiki/AcceptCallingCard FolderData should
@@ -11425,12 +11006,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11425 DeclineCallingCardPacket declineCallingCardPacket = (DeclineCallingCardPacket)Pack; 11006 DeclineCallingCardPacket declineCallingCardPacket = (DeclineCallingCardPacket)Pack;
11426 11007
11427 #region Packet Session and User Check 11008 #region Packet Session and User Check
11428 if (m_checkPackets) 11009 if (declineCallingCardPacket.AgentData.SessionID != SessionId ||
11429 {
11430 if (declineCallingCardPacket.AgentData.SessionID != SessionId ||
11431 declineCallingCardPacket.AgentData.AgentID != AgentId) 11010 declineCallingCardPacket.AgentData.AgentID != AgentId)
11432 return true; 11011 return true;
11433 }
11434 #endregion 11012 #endregion
11435 11013
11436 if (OnDeclineCallingCard != null) 11014 if (OnDeclineCallingCard != null)
@@ -11450,12 +11028,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11450 ActivateGroupPacket activateGroupPacket = (ActivateGroupPacket)Pack; 11028 ActivateGroupPacket activateGroupPacket = (ActivateGroupPacket)Pack;
11451 11029
11452 #region Packet Session and User Check 11030 #region Packet Session and User Check
11453 if (m_checkPackets) 11031 if (activateGroupPacket.AgentData.SessionID != SessionId ||
11454 {
11455 if (activateGroupPacket.AgentData.SessionID != SessionId ||
11456 activateGroupPacket.AgentData.AgentID != AgentId) 11032 activateGroupPacket.AgentData.AgentID != AgentId)
11457 return true; 11033 return true;
11458 }
11459 #endregion 11034 #endregion
11460 11035
11461 if (m_GroupsModule != null) 11036 if (m_GroupsModule != null)
@@ -11537,12 +11112,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11537 (GroupTitlesRequestPacket)Pack; 11112 (GroupTitlesRequestPacket)Pack;
11538 11113
11539 #region Packet Session and User Check 11114 #region Packet Session and User Check
11540 if (m_checkPackets) 11115 if (groupTitlesRequest.AgentData.SessionID != SessionId ||
11541 {
11542 if (groupTitlesRequest.AgentData.SessionID != SessionId ||
11543 groupTitlesRequest.AgentData.AgentID != AgentId) 11116 groupTitlesRequest.AgentData.AgentID != AgentId)
11544 return true; 11117 return true;
11545 }
11546 #endregion 11118 #endregion
11547 11119
11548 if (m_GroupsModule != null) 11120 if (m_GroupsModule != null)
@@ -11599,12 +11171,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11599 11171
11600 11172
11601 #region Packet Session and User Check 11173 #region Packet Session and User Check
11602 if (m_checkPackets) 11174 if (groupProfileRequest.AgentData.SessionID != SessionId ||
11603 {
11604 if (groupProfileRequest.AgentData.SessionID != SessionId ||
11605 groupProfileRequest.AgentData.AgentID != AgentId) 11175 groupProfileRequest.AgentData.AgentID != AgentId)
11606 return true; 11176 return true;
11607 }
11608 #endregion 11177 #endregion
11609 11178
11610 UUID grpID = groupProfileRequest.GroupData.GroupID; 11179 UUID grpID = groupProfileRequest.GroupData.GroupID;
@@ -11671,12 +11240,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11671 (GroupMembersRequestPacket)Pack; 11240 (GroupMembersRequestPacket)Pack;
11672 11241
11673 #region Packet Session and User Check 11242 #region Packet Session and User Check
11674 if (m_checkPackets) 11243 if (groupMembersRequestPacket.AgentData.SessionID != SessionId ||
11675 {
11676 if (groupMembersRequestPacket.AgentData.SessionID != SessionId ||
11677 groupMembersRequestPacket.AgentData.AgentID != AgentId) 11244 groupMembersRequestPacket.AgentData.AgentID != AgentId)
11678 return true; 11245 return true;
11679 }
11680 #endregion 11246 #endregion
11681 11247
11682 if (m_GroupsModule != null) 11248 if (m_GroupsModule != null)
@@ -11739,12 +11305,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11739 (GroupRoleDataRequestPacket)Pack; 11305 (GroupRoleDataRequestPacket)Pack;
11740 11306
11741 #region Packet Session and User Check 11307 #region Packet Session and User Check
11742 if (m_checkPackets) 11308 if (groupRolesRequest.AgentData.SessionID != SessionId ||
11743 {
11744 if (groupRolesRequest.AgentData.SessionID != SessionId ||
11745 groupRolesRequest.AgentData.AgentID != AgentId) 11309 groupRolesRequest.AgentData.AgentID != AgentId)
11746 return true; 11310 return true;
11747 }
11748 #endregion 11311 #endregion
11749 11312
11750 if (m_GroupsModule != null) 11313 if (m_GroupsModule != null)
@@ -11808,12 +11371,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11808 (GroupRoleMembersRequestPacket)Pack; 11371 (GroupRoleMembersRequestPacket)Pack;
11809 11372
11810 #region Packet Session and User Check 11373 #region Packet Session and User Check
11811 if (m_checkPackets) 11374 if (groupRoleMembersRequest.AgentData.SessionID != SessionId ||
11812 {
11813 if (groupRoleMembersRequest.AgentData.SessionID != SessionId ||
11814 groupRoleMembersRequest.AgentData.AgentID != AgentId) 11375 groupRoleMembersRequest.AgentData.AgentID != AgentId)
11815 return true; 11376 return true;
11816 }
11817 #endregion 11377 #endregion
11818 11378
11819 if (m_GroupsModule != null) 11379 if (m_GroupsModule != null)
@@ -11871,12 +11431,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11871 (CreateGroupRequestPacket)Pack; 11431 (CreateGroupRequestPacket)Pack;
11872 11432
11873 #region Packet Session and User Check 11433 #region Packet Session and User Check
11874 if (m_checkPackets) 11434 if (createGroupRequest.AgentData.SessionID != SessionId ||
11875 {
11876 if (createGroupRequest.AgentData.SessionID != SessionId ||
11877 createGroupRequest.AgentData.AgentID != AgentId) 11435 createGroupRequest.AgentData.AgentID != AgentId)
11878 return true; 11436 return true;
11879 }
11880 #endregion 11437 #endregion
11881 11438
11882 if (m_GroupsModule != null) 11439 if (m_GroupsModule != null)
@@ -11899,12 +11456,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11899 (UpdateGroupInfoPacket)Pack; 11456 (UpdateGroupInfoPacket)Pack;
11900 11457
11901 #region Packet Session and User Check 11458 #region Packet Session and User Check
11902 if (m_checkPackets) 11459 if (updateGroupInfo.AgentData.SessionID != SessionId ||
11903 {
11904 if (updateGroupInfo.AgentData.SessionID != SessionId ||
11905 updateGroupInfo.AgentData.AgentID != AgentId) 11460 updateGroupInfo.AgentData.AgentID != AgentId)
11906 return true; 11461 return true;
11907 }
11908 #endregion 11462 #endregion
11909 11463
11910 if (m_GroupsModule != null) 11464 if (m_GroupsModule != null)
@@ -11928,12 +11482,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11928 (SetGroupAcceptNoticesPacket)Pack; 11482 (SetGroupAcceptNoticesPacket)Pack;
11929 11483
11930 #region Packet Session and User Check 11484 #region Packet Session and User Check
11931 if (m_checkPackets) 11485 if (setGroupAcceptNotices.AgentData.SessionID != SessionId ||
11932 {
11933 if (setGroupAcceptNotices.AgentData.SessionID != SessionId ||
11934 setGroupAcceptNotices.AgentData.AgentID != AgentId) 11486 setGroupAcceptNotices.AgentData.AgentID != AgentId)
11935 return true; 11487 return true;
11936 }
11937 #endregion 11488 #endregion
11938 11489
11939 if (m_GroupsModule != null) 11490 if (m_GroupsModule != null)
@@ -11952,12 +11503,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11952 (GroupTitleUpdatePacket)Pack; 11503 (GroupTitleUpdatePacket)Pack;
11953 11504
11954 #region Packet Session and User Check 11505 #region Packet Session and User Check
11955 if (m_checkPackets) 11506 if (groupTitleUpdate.AgentData.SessionID != SessionId ||
11956 {
11957 if (groupTitleUpdate.AgentData.SessionID != SessionId ||
11958 groupTitleUpdate.AgentData.AgentID != AgentId) 11507 groupTitleUpdate.AgentData.AgentID != AgentId)
11959 return true; 11508 return true;
11960 }
11961 #endregion 11509 #endregion
11962 11510
11963 if (m_GroupsModule != null) 11511 if (m_GroupsModule != null)
@@ -11990,12 +11538,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11990 (GroupNoticesListRequestPacket)Pack; 11538 (GroupNoticesListRequestPacket)Pack;
11991 11539
11992 #region Packet Session and User Check 11540 #region Packet Session and User Check
11993 if (m_checkPackets) 11541 if (groupNoticesListRequest.AgentData.SessionID != SessionId ||
11994 {
11995 if (groupNoticesListRequest.AgentData.SessionID != SessionId ||
11996 groupNoticesListRequest.AgentData.AgentID != AgentId) 11542 groupNoticesListRequest.AgentData.AgentID != AgentId)
11997 return true; 11543 return true;
11998 }
11999 #endregion 11544 #endregion
12000 11545
12001 if (m_GroupsModule != null) 11546 if (m_GroupsModule != null)
@@ -12042,12 +11587,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12042 (GroupNoticeRequestPacket)Pack; 11587 (GroupNoticeRequestPacket)Pack;
12043 11588
12044 #region Packet Session and User Check 11589 #region Packet Session and User Check
12045 if (m_checkPackets) 11590 if (groupNoticeRequest.AgentData.SessionID != SessionId ||
12046 {
12047 if (groupNoticeRequest.AgentData.SessionID != SessionId ||
12048 groupNoticeRequest.AgentData.AgentID != AgentId) 11591 groupNoticeRequest.AgentData.AgentID != AgentId)
12049 return true; 11592 return true;
12050 }
12051 #endregion 11593 #endregion
12052 11594
12053 if (m_GroupsModule != null) 11595 if (m_GroupsModule != null)
@@ -12063,12 +11605,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12063 (GroupRoleUpdatePacket)Pack; 11605 (GroupRoleUpdatePacket)Pack;
12064 11606
12065 #region Packet Session and User Check 11607 #region Packet Session and User Check
12066 if (m_checkPackets) 11608 if (groupRoleUpdate.AgentData.SessionID != SessionId ||
12067 {
12068 if (groupRoleUpdate.AgentData.SessionID != SessionId ||
12069 groupRoleUpdate.AgentData.AgentID != AgentId) 11609 groupRoleUpdate.AgentData.AgentID != AgentId)
12070 return true; 11610 return true;
12071 }
12072 #endregion 11611 #endregion
12073 11612
12074 if (m_GroupsModule != null) 11613 if (m_GroupsModule != null)
@@ -12095,12 +11634,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12095 (GroupRoleChangesPacket)Pack; 11634 (GroupRoleChangesPacket)Pack;
12096 11635
12097 #region Packet Session and User Check 11636 #region Packet Session and User Check
12098 if (m_checkPackets) 11637 if (groupRoleChanges.AgentData.SessionID != SessionId ||
12099 {
12100 if (groupRoleChanges.AgentData.SessionID != SessionId ||
12101 groupRoleChanges.AgentData.AgentID != AgentId) 11638 groupRoleChanges.AgentData.AgentID != AgentId)
12102 return true; 11639 return true;
12103 }
12104 #endregion 11640 #endregion
12105 11641
12106 if (m_GroupsModule != null) 11642 if (m_GroupsModule != null)
@@ -12124,12 +11660,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12124 (JoinGroupRequestPacket)Pack; 11660 (JoinGroupRequestPacket)Pack;
12125 11661
12126 #region Packet Session and User Check 11662 #region Packet Session and User Check
12127 if (m_checkPackets) 11663 if (joinGroupRequest.AgentData.SessionID != SessionId ||
12128 {
12129 if (joinGroupRequest.AgentData.SessionID != SessionId ||
12130 joinGroupRequest.AgentData.AgentID != AgentId) 11664 joinGroupRequest.AgentData.AgentID != AgentId)
12131 return true; 11665 return true;
12132 }
12133 #endregion 11666 #endregion
12134 11667
12135 if (m_GroupsModule != null) 11668 if (m_GroupsModule != null)
@@ -12145,12 +11678,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12145 (LeaveGroupRequestPacket)Pack; 11678 (LeaveGroupRequestPacket)Pack;
12146 11679
12147 #region Packet Session and User Check 11680 #region Packet Session and User Check
12148 if (m_checkPackets) 11681 if (leaveGroupRequest.AgentData.SessionID != SessionId ||
12149 {
12150 if (leaveGroupRequest.AgentData.SessionID != SessionId ||
12151 leaveGroupRequest.AgentData.AgentID != AgentId) 11682 leaveGroupRequest.AgentData.AgentID != AgentId)
12152 return true; 11683 return true;
12153 }
12154 #endregion 11684 #endregion
12155 11685
12156 if (m_GroupsModule != null) 11686 if (m_GroupsModule != null)
@@ -12166,12 +11696,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12166 (EjectGroupMemberRequestPacket)Pack; 11696 (EjectGroupMemberRequestPacket)Pack;
12167 11697
12168 #region Packet Session and User Check 11698 #region Packet Session and User Check
12169 if (m_checkPackets) 11699 if (ejectGroupMemberRequest.AgentData.SessionID != SessionId ||
12170 {
12171 if (ejectGroupMemberRequest.AgentData.SessionID != SessionId ||
12172 ejectGroupMemberRequest.AgentData.AgentID != AgentId) 11700 ejectGroupMemberRequest.AgentData.AgentID != AgentId)
12173 return true; 11701 return true;
12174 }
12175 #endregion 11702 #endregion
12176 11703
12177 if (m_GroupsModule != null) 11704 if (m_GroupsModule != null)
@@ -12192,12 +11719,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12192 (InviteGroupRequestPacket)Pack; 11719 (InviteGroupRequestPacket)Pack;
12193 11720
12194 #region Packet Session and User Check 11721 #region Packet Session and User Check
12195 if (m_checkPackets) 11722 if (inviteGroupRequest.AgentData.SessionID != SessionId ||
12196 {
12197 if (inviteGroupRequest.AgentData.SessionID != SessionId ||
12198 inviteGroupRequest.AgentData.AgentID != AgentId) 11723 inviteGroupRequest.AgentData.AgentID != AgentId)
12199 return true; 11724 return true;
12200 }
12201 #endregion 11725 #endregion
12202 11726
12203 if (m_GroupsModule != null) 11727 if (m_GroupsModule != null)
@@ -12221,12 +11745,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12221 StartLurePacket startLureRequest = (StartLurePacket)Pack; 11745 StartLurePacket startLureRequest = (StartLurePacket)Pack;
12222 11746
12223 #region Packet Session and User Check 11747 #region Packet Session and User Check
12224 if (m_checkPackets) 11748 if (startLureRequest.AgentData.SessionID != SessionId ||
12225 {
12226 if (startLureRequest.AgentData.SessionID != SessionId ||
12227 startLureRequest.AgentData.AgentID != AgentId) 11749 startLureRequest.AgentData.AgentID != AgentId)
12228 return true; 11750 return true;
12229 }
12230 #endregion 11751 #endregion
12231 11752
12232 StartLure handlerStartLure = OnStartLure; 11753 StartLure handlerStartLure = OnStartLure;
@@ -12249,12 +11770,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12249 (TeleportLureRequestPacket)Pack; 11770 (TeleportLureRequestPacket)Pack;
12250 11771
12251 #region Packet Session and User Check 11772 #region Packet Session and User Check
12252 if (m_checkPackets) 11773 if (teleportLureRequest.Info.SessionID != SessionId ||
12253 {
12254 if (teleportLureRequest.Info.SessionID != SessionId ||
12255 teleportLureRequest.Info.AgentID != AgentId) 11774 teleportLureRequest.Info.AgentID != AgentId)
12256 return true; 11775 return true;
12257 }
12258 #endregion 11776 #endregion
12259 11777
12260 TeleportLureRequest handlerTeleportLureRequest = OnTeleportLureRequest; 11778 TeleportLureRequest handlerTeleportLureRequest = OnTeleportLureRequest;
@@ -12271,12 +11789,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12271 (ClassifiedInfoRequestPacket)Pack; 11789 (ClassifiedInfoRequestPacket)Pack;
12272 11790
12273 #region Packet Session and User Check 11791 #region Packet Session and User Check
12274 if (m_checkPackets) 11792 if (classifiedInfoRequest.AgentData.SessionID != SessionId ||
12275 {
12276 if (classifiedInfoRequest.AgentData.SessionID != SessionId ||
12277 classifiedInfoRequest.AgentData.AgentID != AgentId) 11793 classifiedInfoRequest.AgentData.AgentID != AgentId)
12278 return true; 11794 return true;
12279 }
12280 #endregion 11795 #endregion
12281 11796
12282 ClassifiedInfoRequest handlerClassifiedInfoRequest = OnClassifiedInfoRequest; 11797 ClassifiedInfoRequest handlerClassifiedInfoRequest = OnClassifiedInfoRequest;
@@ -12292,12 +11807,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12292 (ClassifiedInfoUpdatePacket)Pack; 11807 (ClassifiedInfoUpdatePacket)Pack;
12293 11808
12294 #region Packet Session and User Check 11809 #region Packet Session and User Check
12295 if (m_checkPackets) 11810 if (classifiedInfoUpdate.AgentData.SessionID != SessionId ||
12296 {
12297 if (classifiedInfoUpdate.AgentData.SessionID != SessionId ||
12298 classifiedInfoUpdate.AgentData.AgentID != AgentId) 11811 classifiedInfoUpdate.AgentData.AgentID != AgentId)
12299 return true; 11812 return true;
12300 }
12301 #endregion 11813 #endregion
12302 11814
12303 ClassifiedInfoUpdate handlerClassifiedInfoUpdate = OnClassifiedInfoUpdate; 11815 ClassifiedInfoUpdate handlerClassifiedInfoUpdate = OnClassifiedInfoUpdate;
@@ -12325,12 +11837,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12325 (ClassifiedDeletePacket)Pack; 11837 (ClassifiedDeletePacket)Pack;
12326 11838
12327 #region Packet Session and User Check 11839 #region Packet Session and User Check
12328 if (m_checkPackets) 11840 if (classifiedDelete.AgentData.SessionID != SessionId ||
12329 {
12330 if (classifiedDelete.AgentData.SessionID != SessionId ||
12331 classifiedDelete.AgentData.AgentID != AgentId) 11841 classifiedDelete.AgentData.AgentID != AgentId)
12332 return true; 11842 return true;
12333 }
12334 #endregion 11843 #endregion
12335 11844
12336 ClassifiedDelete handlerClassifiedDelete = OnClassifiedDelete; 11845 ClassifiedDelete handlerClassifiedDelete = OnClassifiedDelete;
@@ -12346,12 +11855,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12346 (ClassifiedGodDeletePacket)Pack; 11855 (ClassifiedGodDeletePacket)Pack;
12347 11856
12348 #region Packet Session and User Check 11857 #region Packet Session and User Check
12349 if (m_checkPackets) 11858 if (classifiedGodDelete.AgentData.SessionID != SessionId ||
12350 {
12351 if (classifiedGodDelete.AgentData.SessionID != SessionId ||
12352 classifiedGodDelete.AgentData.AgentID != AgentId) 11859 classifiedGodDelete.AgentData.AgentID != AgentId)
12353 return true; 11860 return true;
12354 }
12355 #endregion 11861 #endregion
12356 11862
12357 ClassifiedGodDelete handlerClassifiedGodDelete = OnClassifiedGodDelete; 11863 ClassifiedGodDelete handlerClassifiedGodDelete = OnClassifiedGodDelete;
@@ -12368,12 +11874,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12368 (EventGodDeletePacket)Pack; 11874 (EventGodDeletePacket)Pack;
12369 11875
12370 #region Packet Session and User Check 11876 #region Packet Session and User Check
12371 if (m_checkPackets) 11877 if (eventGodDelete.AgentData.SessionID != SessionId ||
12372 {
12373 if (eventGodDelete.AgentData.SessionID != SessionId ||
12374 eventGodDelete.AgentData.AgentID != AgentId) 11878 eventGodDelete.AgentData.AgentID != AgentId)
12375 return true; 11879 return true;
12376 }
12377 #endregion 11880 #endregion
12378 11881
12379 EventGodDelete handlerEventGodDelete = OnEventGodDelete; 11882 EventGodDelete handlerEventGodDelete = OnEventGodDelete;
@@ -12394,12 +11897,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12394 (EventNotificationAddRequestPacket)Pack; 11897 (EventNotificationAddRequestPacket)Pack;
12395 11898
12396 #region Packet Session and User Check 11899 #region Packet Session and User Check
12397 if (m_checkPackets) 11900 if (eventNotificationAdd.AgentData.SessionID != SessionId ||
12398 {
12399 if (eventNotificationAdd.AgentData.SessionID != SessionId ||
12400 eventNotificationAdd.AgentData.AgentID != AgentId) 11901 eventNotificationAdd.AgentData.AgentID != AgentId)
12401 return true; 11902 return true;
12402 }
12403 #endregion 11903 #endregion
12404 11904
12405 EventNotificationAddRequest handlerEventNotificationAddRequest = OnEventNotificationAddRequest; 11905 EventNotificationAddRequest handlerEventNotificationAddRequest = OnEventNotificationAddRequest;
@@ -12414,12 +11914,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12414 (EventNotificationRemoveRequestPacket)Pack; 11914 (EventNotificationRemoveRequestPacket)Pack;
12415 11915
12416 #region Packet Session and User Check 11916 #region Packet Session and User Check
12417 if (m_checkPackets) 11917 if (eventNotificationRemove.AgentData.SessionID != SessionId ||
12418 {
12419 if (eventNotificationRemove.AgentData.SessionID != SessionId ||
12420 eventNotificationRemove.AgentData.AgentID != AgentId) 11918 eventNotificationRemove.AgentData.AgentID != AgentId)
12421 return true; 11919 return true;
12422 }
12423 #endregion 11920 #endregion
12424 11921
12425 EventNotificationRemoveRequest handlerEventNotificationRemoveRequest = OnEventNotificationRemoveRequest; 11922 EventNotificationRemoveRequest handlerEventNotificationRemoveRequest = OnEventNotificationRemoveRequest;
@@ -12433,12 +11930,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12433 RetrieveInstantMessagesPacket rimpInstantMessagePack = (RetrieveInstantMessagesPacket)Pack; 11930 RetrieveInstantMessagesPacket rimpInstantMessagePack = (RetrieveInstantMessagesPacket)Pack;
12434 11931
12435 #region Packet Session and User Check 11932 #region Packet Session and User Check
12436 if (m_checkPackets) 11933 if (rimpInstantMessagePack.AgentData.SessionID != SessionId ||
12437 {
12438 if (rimpInstantMessagePack.AgentData.SessionID != SessionId ||
12439 rimpInstantMessagePack.AgentData.AgentID != AgentId) 11934 rimpInstantMessagePack.AgentData.AgentID != AgentId)
12440 return true; 11935 return true;
12441 }
12442 #endregion 11936 #endregion
12443 11937
12444 RetrieveInstantMessages handlerRetrieveInstantMessages = OnRetrieveInstantMessages; 11938 RetrieveInstantMessages handlerRetrieveInstantMessages = OnRetrieveInstantMessages;
@@ -12452,12 +11946,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12452 (PickDeletePacket)Pack; 11946 (PickDeletePacket)Pack;
12453 11947
12454 #region Packet Session and User Check 11948 #region Packet Session and User Check
12455 if (m_checkPackets) 11949 if (pickDelete.AgentData.SessionID != SessionId ||
12456 {
12457 if (pickDelete.AgentData.SessionID != SessionId ||
12458 pickDelete.AgentData.AgentID != AgentId) 11950 pickDelete.AgentData.AgentID != AgentId)
12459 return true; 11951 return true;
12460 }
12461 #endregion 11952 #endregion
12462 11953
12463 PickDelete handlerPickDelete = OnPickDelete; 11954 PickDelete handlerPickDelete = OnPickDelete;
@@ -12471,12 +11962,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12471 (PickGodDeletePacket)Pack; 11962 (PickGodDeletePacket)Pack;
12472 11963
12473 #region Packet Session and User Check 11964 #region Packet Session and User Check
12474 if (m_checkPackets) 11965 if (pickGodDelete.AgentData.SessionID != SessionId ||
12475 {
12476 if (pickGodDelete.AgentData.SessionID != SessionId ||
12477 pickGodDelete.AgentData.AgentID != AgentId) 11966 pickGodDelete.AgentData.AgentID != AgentId)
12478 return true; 11967 return true;
12479 }
12480 #endregion 11968 #endregion
12481 11969
12482 PickGodDelete handlerPickGodDelete = OnPickGodDelete; 11970 PickGodDelete handlerPickGodDelete = OnPickGodDelete;
@@ -12493,12 +11981,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12493 (PickInfoUpdatePacket)Pack; 11981 (PickInfoUpdatePacket)Pack;
12494 11982
12495 #region Packet Session and User Check 11983 #region Packet Session and User Check
12496 if (m_checkPackets) 11984 if (pickInfoUpdate.AgentData.SessionID != SessionId ||
12497 {
12498 if (pickInfoUpdate.AgentData.SessionID != SessionId ||
12499 pickInfoUpdate.AgentData.AgentID != AgentId) 11985 pickInfoUpdate.AgentData.AgentID != AgentId)
12500 return true; 11986 return true;
12501 }
12502 #endregion 11987 #endregion
12503 11988
12504 PickInfoUpdate handlerPickInfoUpdate = OnPickInfoUpdate; 11989 PickInfoUpdate handlerPickInfoUpdate = OnPickInfoUpdate;
@@ -12520,12 +12005,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12520 (AvatarNotesUpdatePacket)Pack; 12005 (AvatarNotesUpdatePacket)Pack;
12521 12006
12522 #region Packet Session and User Check 12007 #region Packet Session and User Check
12523 if (m_checkPackets) 12008 if (avatarNotesUpdate.AgentData.SessionID != SessionId ||
12524 {
12525 if (avatarNotesUpdate.AgentData.SessionID != SessionId ||
12526 avatarNotesUpdate.AgentData.AgentID != AgentId) 12009 avatarNotesUpdate.AgentData.AgentID != AgentId)
12527 return true; 12010 return true;
12528 }
12529 #endregion 12011 #endregion
12530 12012
12531 AvatarNotesUpdate handlerAvatarNotesUpdate = OnAvatarNotesUpdate; 12013 AvatarNotesUpdate handlerAvatarNotesUpdate = OnAvatarNotesUpdate;
@@ -12541,12 +12023,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12541 (AvatarInterestsUpdatePacket)Pack; 12023 (AvatarInterestsUpdatePacket)Pack;
12542 12024
12543 #region Packet Session and User Check 12025 #region Packet Session and User Check
12544 if (m_checkPackets) 12026 if (avatarInterestUpdate.AgentData.SessionID != SessionId ||
12545 {
12546 if (avatarInterestUpdate.AgentData.SessionID != SessionId ||
12547 avatarInterestUpdate.AgentData.AgentID != AgentId) 12027 avatarInterestUpdate.AgentData.AgentID != AgentId)
12548 return true; 12028 return true;
12549 }
12550 #endregion 12029 #endregion
12551 12030
12552 AvatarInterestUpdate handlerAvatarInterestUpdate = OnAvatarInterestUpdate; 12031 AvatarInterestUpdate handlerAvatarInterestUpdate = OnAvatarInterestUpdate;
@@ -12565,12 +12044,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12565 GrantUserRightsPacket GrantUserRights = 12044 GrantUserRightsPacket GrantUserRights =
12566 (GrantUserRightsPacket)Pack; 12045 (GrantUserRightsPacket)Pack;
12567 #region Packet Session and User Check 12046 #region Packet Session and User Check
12568 if (m_checkPackets) 12047 if (GrantUserRights.AgentData.SessionID != SessionId ||
12569 {
12570 if (GrantUserRights.AgentData.SessionID != SessionId ||
12571 GrantUserRights.AgentData.AgentID != AgentId) 12048 GrantUserRights.AgentData.AgentID != AgentId)
12572 return true; 12049 return true;
12573 }
12574 #endregion 12050 #endregion
12575 12051
12576 GrantUserFriendRights GrantUserRightsHandler = OnGrantUserRights; 12052 GrantUserFriendRights GrantUserRightsHandler = OnGrantUserRights;
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index ebfc58c..ae7885b 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -684,17 +684,12 @@ namespace OpenSim.Region.CoreModules.World.Land
684 } 684 }
685 685
686 public void ClientOnParcelAccessListUpdateRequest(UUID agentID, 686 public void ClientOnParcelAccessListUpdateRequest(UUID agentID,
687 uint flags, int landLocalID, UUID transactionID, int sequenceID, 687 uint flags, UUID transactionID, int landLocalID, List<LandAccessEntry> entries,
688 int sections, List<LandAccessEntry> entries,
689 IClientAPI remote_client) 688 IClientAPI remote_client)
690 { 689 {
691 // Flags is the list to update, it can mean either the ban or 690 if ((flags & 0x03) == 0)
692 // the access list (WTH is a pass list? Mentioned in ParcelFlags) 691 return; // we only have access and ban
693 // 692
694 // There may be multiple packets, because these can get LONG.
695 // Use transactionID to determine a new chain of packets since
696 // packets may have come in out of sequence and that would be
697 // a big mess if using the sequenceID
698 ILandObject land; 693 ILandObject land;
699 lock (m_landList) 694 lock (m_landList)
700 { 695 {
@@ -703,15 +698,19 @@ namespace OpenSim.Region.CoreModules.World.Land
703 698
704 if (land != null) 699 if (land != null)
705 { 700 {
706 GroupPowers requiredPowers = GroupPowers.LandManageAllowed; 701 GroupPowers requiredPowers = GroupPowers.None;
707 if (flags == (uint)AccessList.Ban) 702 if ((flags & (uint)AccessList.Access) != 0)
708 requiredPowers = GroupPowers.LandManageBanned; 703 requiredPowers |= GroupPowers.LandManageAllowed;
704 if ((flags & (uint)AccessList.Ban) != 0)
705 requiredPowers |= GroupPowers.LandManageBanned;
706
707 if(requiredPowers == GroupPowers.None)
708 return;
709 709
710 if (m_scene.Permissions.CanEditParcelProperties(agentID, 710 if (m_scene.Permissions.CanEditParcelProperties(agentID,
711 land, requiredPowers, false)) 711 land, requiredPowers, false))
712 { 712 {
713 land.UpdateAccessList(flags, transactionID, sequenceID, 713 land.UpdateAccessList(flags, transactionID, entries);
714 sections, entries, remote_client);
715 } 714 }
716 } 715 }
717 else 716 else
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 2c9ff00..88ca0c6 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -54,7 +54,8 @@ namespace OpenSim.Region.CoreModules.World.Land
54 54
55 protected Scene m_scene; 55 protected Scene m_scene;
56 protected List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>(); 56 protected List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>();
57 protected Dictionary<uint, UUID> m_listTransactions = new Dictionary<uint, UUID>(); 57 private Dictionary<uint, UUID> m_listTransactions = new Dictionary<uint, UUID>();
58 private object m_listTransactionsLock = new object();
58 59
59 protected ExpiringCache<UUID, bool> m_groupMemberCache = new ExpiringCache<UUID, bool>(); 60 protected ExpiringCache<UUID, bool> m_groupMemberCache = new ExpiringCache<UUID, bool>();
60 protected TimeSpan m_groupMemberCacheTimeout = TimeSpan.FromSeconds(30); // cache invalidation after 30 seconds 61 protected TimeSpan m_groupMemberCacheTimeout = TimeSpan.FromSeconds(30); // cache invalidation after 30 seconds
@@ -869,66 +870,61 @@ namespace OpenSim.Region.CoreModules.World.Land
869 } 870 }
870 } 871 }
871 872
872 public void UpdateAccessList(uint flags, UUID transactionID, 873 public void UpdateAccessList(uint flags, UUID transactionID, List<LandAccessEntry> entries)
873 int sequenceID, int sections,
874 List<LandAccessEntry> entries,
875 IClientAPI remote_client)
876 { 874 {
877 LandData newData = LandData.Copy(); 875 if((flags & 0x03) == 0)
878 876 return; // we only have access and ban
879 if ((!m_listTransactions.ContainsKey(flags)) ||
880 m_listTransactions[flags] != transactionID)
881 {
882 m_listTransactions[flags] = transactionID;
883
884 List<LandAccessEntry> toRemove =
885 new List<LandAccessEntry>();
886
887 foreach (LandAccessEntry entry in newData.ParcelAccessList)
888 {
889 if (entry.Flags == (AccessList)flags)
890 toRemove.Add(entry);
891 }
892 877
893 foreach (LandAccessEntry entry in toRemove) 878 flags &=0x03 ;
894 { 879 // get a work copy of lists
895 newData.ParcelAccessList.Remove(entry); 880 List<LandAccessEntry> parcelAccessList = new List<LandAccessEntry>(LandData.ParcelAccessList);
896 }
897 881
898 // Checked here because this will always be the first 882 // first packet on a transaction clears before adding
899 // and only packet in a transaction 883 // we need to this way because viewer protocol does not seem reliable
900 if (entries.Count == 1 && entries[0].AgentID == UUID.Zero) 884 lock (m_listTransactionsLock)
885 {
886 if ((!m_listTransactions.ContainsKey(flags)) ||
887 m_listTransactions[flags] != transactionID)
901 { 888 {
902 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); 889 m_listTransactions[flags] = transactionID;
890 List<LandAccessEntry> toRemove = new List<LandAccessEntry>();
891 foreach (LandAccessEntry entry in parcelAccessList)
892 {
893 if (((uint)entry.Flags & flags) != 0)
894 toRemove.Add(entry);
895 }
896 foreach (LandAccessEntry entry in toRemove)
897 parcelAccessList.Remove(entry);
903 898
904 return; 899 // a delete all command ?
900 if (entries.Count == 1 && entries[0].AgentID == UUID.Zero)
901 {
902 LandData.ParcelAccessList = parcelAccessList;
903 if ((flags & (uint)AccessList.Access) != 0)
904 LandData.Flags &= ~(uint)ParcelFlags.UseAccessList;
905 if ((flags & (uint)AccessList.Ban) != 0)
906 LandData.Flags &= ~(uint)ParcelFlags.UseBanList;
907 m_listTransactions.Remove(flags);
908 return;
909 }
905 } 910 }
906 } 911 }
907 912
908 foreach (LandAccessEntry entry in entries) 913 foreach (LandAccessEntry entry in entries)
909 { 914 {
910 LandAccessEntry temp = 915 LandAccessEntry temp = new LandAccessEntry();
911 new LandAccessEntry();
912
913 temp.AgentID = entry.AgentID; 916 temp.AgentID = entry.AgentID;
914 temp.Expires = entry.Expires; 917 temp.Expires = entry.Expires;
915 temp.Flags = (AccessList)flags; 918 temp.Flags = (AccessList)flags;
916 919
917 newData.ParcelAccessList.Add(temp); 920 parcelAccessList.Add(temp);
918 } 921 }
919 922
920 // update use lists flags 923 LandData.ParcelAccessList = parcelAccessList;
921 // rights already checked or we wont be here 924 if ((flags & (uint)AccessList.Access) != 0)
922 uint parcelflags = newData.Flags; 925 LandData.Flags |= (uint)ParcelFlags.UseAccessList;
923 926 if ((flags & (uint)AccessList.Ban) != 0)
924 if((flags & (uint)AccessList.Access) != 0) 927 LandData.Flags |= (uint)ParcelFlags.UseBanList;
925 parcelflags |= (uint)ParcelFlags.UseAccessList;
926 if((flags & (uint)AccessList.Ban) != 0)
927 parcelflags |= (uint)ParcelFlags.UseBanList;
928
929 newData.Flags = parcelflags;
930
931 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
932 } 928 }
933 929
934 #endregion 930 #endregion
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index bb23f2f..02ac349 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -541,6 +541,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
541 public event GodlikeMessage onGodlikeMessage; 541 public event GodlikeMessage onGodlikeMessage;
542 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; 542 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
543 public event GenericCall2 OnUpdateThrottles; 543 public event GenericCall2 OnUpdateThrottles;
544 public event AgentFOV OnAgentFOV;
545
544#pragma warning restore 67 546#pragma warning restore 67
545 547
546 #endregion 548 #endregion
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 449716b..91a71ec 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -343,6 +343,8 @@ namespace OpenSim.Tests.Common
343 public event GodlikeMessage onGodlikeMessage; 343 public event GodlikeMessage onGodlikeMessage;
344 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; 344 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
345 public event GenericCall2 OnUpdateThrottles; 345 public event GenericCall2 OnUpdateThrottles;
346 public event AgentFOV OnAgentFOV;
347
346#pragma warning restore 67 348#pragma warning restore 67
347 349
348 /// <value> 350 /// <value>