diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 165 |
1 files changed, 101 insertions, 64 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index ee28914..3c65647 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -47,6 +47,7 @@ using OpenSim.Region.Framework.Scenes; | |||
47 | using OpenSim.Services.Interfaces; | 47 | using OpenSim.Services.Interfaces; |
48 | using Timer = System.Timers.Timer; | 48 | using Timer = System.Timers.Timer; |
49 | using AssetLandmark = OpenSim.Framework.AssetLandmark; | 49 | using AssetLandmark = OpenSim.Framework.AssetLandmark; |
50 | using RegionFlags = OpenMetaverse.RegionFlags; | ||
50 | using Nini.Config; | 51 | using Nini.Config; |
51 | 52 | ||
52 | using System.IO; | 53 | using System.IO; |
@@ -354,7 +355,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
354 | private bool m_deliverPackets = true; | 355 | private bool m_deliverPackets = true; |
355 | private int m_animationSequenceNumber = 1; | 356 | private int m_animationSequenceNumber = 1; |
356 | private bool m_SendLogoutPacketWhenClosing = true; | 357 | private bool m_SendLogoutPacketWhenClosing = true; |
357 | private AgentUpdateArgs lastarg; | 358 | |
359 | /// <summary> | ||
360 | /// We retain a single AgentUpdateArgs so that we can constantly reuse it rather than construct a new one for | ||
361 | /// every single incoming AgentUpdate. Every client sends 10 AgentUpdate UDP messages per second, even if it | ||
362 | /// is doing absolutely nothing. | ||
363 | /// </summary> | ||
364 | /// <remarks> | ||
365 | /// This does mean that agent updates must be processed synchronously, at least for each client, and called methods | ||
366 | /// cannot retain a reference to it outside of that method. | ||
367 | /// </remarks> | ||
368 | private AgentUpdateArgs m_lastAgentUpdateArgs; | ||
358 | 369 | ||
359 | protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>(); | 370 | protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>(); |
360 | protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers | 371 | protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers |
@@ -509,19 +520,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
509 | /// </summary> | 520 | /// </summary> |
510 | public void Close() | 521 | public void Close() |
511 | { | 522 | { |
512 | Close(true); | 523 | Close(true, false); |
513 | } | 524 | } |
514 | 525 | ||
515 | /// <summary> | 526 | public void Close(bool sendStop, bool force) |
516 | /// Shut down the client view | ||
517 | /// </summary> | ||
518 | public void Close(bool sendStop) | ||
519 | { | 527 | { |
520 | // We lock here to prevent race conditions between two threads calling close simultaneously (e.g. | 528 | // We lock here to prevent race conditions between two threads calling close simultaneously (e.g. |
521 | // a simultaneous relog just as a client is being closed out due to no packet ack from the old connection. | 529 | // a simultaneous relog just as a client is being closed out due to no packet ack from the old connection. |
522 | lock (CloseSyncLock) | 530 | lock (CloseSyncLock) |
523 | { | 531 | { |
524 | if (!IsActive) | 532 | // We still perform a force close inside the sync lock since this is intended to attempt close where |
533 | // there is some unidentified connection problem, not where we have issues due to deadlock | ||
534 | if (!IsActive && !force) | ||
525 | return; | 535 | return; |
526 | 536 | ||
527 | IsActive = false; | 537 | IsActive = false; |
@@ -836,8 +846,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
836 | OutPacket(mov, ThrottleOutPacketType.Unknown); | 846 | OutPacket(mov, ThrottleOutPacketType.Unknown); |
837 | } | 847 | } |
838 | 848 | ||
839 | public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, | 849 | public void SendChatMessage( |
840 | UUID fromAgentID, byte source, byte audible) | 850 | string message, byte type, Vector3 fromPos, string fromName, |
851 | UUID fromAgentID, UUID ownerID, byte source, byte audible) | ||
841 | { | 852 | { |
842 | ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator); | 853 | ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator); |
843 | reply.ChatData.Audible = audible; | 854 | reply.ChatData.Audible = audible; |
@@ -846,7 +857,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
846 | reply.ChatData.SourceType = source; | 857 | reply.ChatData.SourceType = source; |
847 | reply.ChatData.Position = fromPos; | 858 | reply.ChatData.Position = fromPos; |
848 | reply.ChatData.FromName = Util.StringToBytes256(fromName); | 859 | reply.ChatData.FromName = Util.StringToBytes256(fromName); |
849 | reply.ChatData.OwnerID = fromAgentID; | 860 | reply.ChatData.OwnerID = ownerID; |
850 | reply.ChatData.SourceID = fromAgentID; | 861 | reply.ChatData.SourceID = fromAgentID; |
851 | 862 | ||
852 | OutPacket(reply, ThrottleOutPacketType.Unknown); | 863 | OutPacket(reply, ThrottleOutPacketType.Unknown); |
@@ -3984,7 +3995,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3984 | { | 3995 | { |
3985 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value; | 3996 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value; |
3986 | 3997 | ||
3987 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); | 3998 | ImprovedTerseObjectUpdatePacket packet |
3999 | = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); | ||
3988 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | 4000 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
3989 | packet.RegionData.TimeDilation = timeDilation; | 4001 | packet.RegionData.TimeDilation = timeDilation; |
3990 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | 4002 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; |
@@ -4029,7 +4041,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4029 | { | 4041 | { |
4030 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value; | 4042 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value; |
4031 | 4043 | ||
4032 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); | 4044 | ImprovedTerseObjectUpdatePacket packet |
4045 | = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket( | ||
4046 | PacketType.ImprovedTerseObjectUpdate); | ||
4033 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | 4047 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
4034 | packet.RegionData.TimeDilation = timeDilation; | 4048 | packet.RegionData.TimeDilation = timeDilation; |
4035 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | 4049 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; |
@@ -4037,7 +4051,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4037 | for (int i = 0; i < blocks.Count; i++) | 4051 | for (int i = 0; i < blocks.Count; i++) |
4038 | packet.ObjectData[i] = blocks[i]; | 4052 | packet.ObjectData[i] = blocks[i]; |
4039 | 4053 | ||
4040 | OutPacket(packet, ThrottleOutPacketType.Task, true); | 4054 | OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); |
4041 | } | 4055 | } |
4042 | 4056 | ||
4043 | #endregion Packet Sending | 4057 | #endregion Packet Sending |
@@ -4534,7 +4548,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4534 | { | 4548 | { |
4535 | returnblock[j] = new EstateOwnerMessagePacket.ParamListBlock(); | 4549 | returnblock[j] = new EstateOwnerMessagePacket.ParamListBlock(); |
4536 | } | 4550 | } |
4537 | j = 0; | 4551 | j = 0; |
4538 | 4552 | ||
4539 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; | 4553 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; |
4540 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; | 4554 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; |
@@ -5038,7 +5052,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5038 | Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Y, -64.0f, 64.0f), data, pos); pos += 2; | 5052 | Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Y, -64.0f, 64.0f), data, pos); pos += 2; |
5039 | Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2; | 5053 | Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2; |
5040 | 5054 | ||
5041 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock block = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); | 5055 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock block |
5056 | = PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | ||
5057 | |||
5042 | block.Data = data; | 5058 | block.Data = data; |
5043 | 5059 | ||
5044 | if (textureEntry != null && textureEntry.Length > 0) | 5060 | if (textureEntry != null && textureEntry.Length > 0) |
@@ -5288,7 +5304,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5288 | protected virtual void RegisterLocalPacketHandlers() | 5304 | protected virtual void RegisterLocalPacketHandlers() |
5289 | { | 5305 | { |
5290 | AddLocalPacketHandler(PacketType.LogoutRequest, HandleLogout); | 5306 | AddLocalPacketHandler(PacketType.LogoutRequest, HandleLogout); |
5307 | |||
5308 | // If AgentUpdate is ever handled asynchronously, then we will also need to construct a new AgentUpdateArgs | ||
5309 | // for each AgentUpdate packet. | ||
5291 | AddLocalPacketHandler(PacketType.AgentUpdate, HandleAgentUpdate, false); | 5310 | AddLocalPacketHandler(PacketType.AgentUpdate, HandleAgentUpdate, false); |
5311 | |||
5292 | AddLocalPacketHandler(PacketType.ViewerEffect, HandleViewerEffect, false); | 5312 | AddLocalPacketHandler(PacketType.ViewerEffect, HandleViewerEffect, false); |
5293 | AddLocalPacketHandler(PacketType.AgentCachedTexture, HandleAgentTextureCached, false); | 5313 | AddLocalPacketHandler(PacketType.AgentCachedTexture, HandleAgentTextureCached, false); |
5294 | AddLocalPacketHandler(PacketType.MultipleObjectUpdate, HandleMultipleObjUpdate, false); | 5314 | AddLocalPacketHandler(PacketType.MultipleObjectUpdate, HandleMultipleObjUpdate, false); |
@@ -5517,81 +5537,84 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5517 | 5537 | ||
5518 | #region Scene/Avatar | 5538 | #region Scene/Avatar |
5519 | 5539 | ||
5520 | private bool HandleAgentUpdate(IClientAPI sener, Packet Pack) | 5540 | private bool HandleAgentUpdate(IClientAPI sener, Packet packet) |
5521 | { | 5541 | { |
5522 | if (OnAgentUpdate != null) | 5542 | if (OnAgentUpdate != null) |
5523 | { | 5543 | { |
5524 | bool update = false; | 5544 | AgentUpdatePacket agentUpdate = (AgentUpdatePacket)packet; |
5525 | AgentUpdatePacket agenUpdate = (AgentUpdatePacket)Pack; | ||
5526 | 5545 | ||
5527 | #region Packet Session and User Check | 5546 | #region Packet Session and User Check |
5528 | if (agenUpdate.AgentData.SessionID != SessionId || agenUpdate.AgentData.AgentID != AgentId) | 5547 | if (agentUpdate.AgentData.SessionID != SessionId || agentUpdate.AgentData.AgentID != AgentId) |
5548 | { | ||
5549 | PacketPool.Instance.ReturnPacket(packet); | ||
5529 | return false; | 5550 | return false; |
5551 | } | ||
5530 | #endregion | 5552 | #endregion |
5531 | 5553 | ||
5532 | AgentUpdatePacket.AgentDataBlock x = agenUpdate.AgentData; | 5554 | bool update = false; |
5533 | 5555 | AgentUpdatePacket.AgentDataBlock x = agentUpdate.AgentData; | |
5534 | // We can only check when we have something to check | ||
5535 | // against. | ||
5536 | 5556 | ||
5537 | if (lastarg != null) | 5557 | if (m_lastAgentUpdateArgs != null) |
5538 | { | 5558 | { |
5559 | // These should be ordered from most-likely to | ||
5560 | // least likely to change. I've made an initial | ||
5561 | // guess at that. | ||
5539 | update = | 5562 | update = |
5540 | ( | 5563 | ( |
5541 | (x.BodyRotation != lastarg.BodyRotation) || | 5564 | (x.BodyRotation != m_lastAgentUpdateArgs.BodyRotation) || |
5542 | (x.CameraAtAxis != lastarg.CameraAtAxis) || | 5565 | (x.CameraAtAxis != m_lastAgentUpdateArgs.CameraAtAxis) || |
5543 | (x.CameraCenter != lastarg.CameraCenter) || | 5566 | (x.CameraCenter != m_lastAgentUpdateArgs.CameraCenter) || |
5544 | (x.CameraLeftAxis != lastarg.CameraLeftAxis) || | 5567 | (x.CameraLeftAxis != m_lastAgentUpdateArgs.CameraLeftAxis) || |
5545 | (x.CameraUpAxis != lastarg.CameraUpAxis) || | 5568 | (x.CameraUpAxis != m_lastAgentUpdateArgs.CameraUpAxis) || |
5546 | (x.ControlFlags != lastarg.ControlFlags) || | 5569 | (x.ControlFlags != m_lastAgentUpdateArgs.ControlFlags) || |
5547 | (x.ControlFlags != 0) || | 5570 | (x.ControlFlags != 0) || |
5548 | (x.Far != lastarg.Far) || | 5571 | (x.Far != m_lastAgentUpdateArgs.Far) || |
5549 | (x.Flags != lastarg.Flags) || | 5572 | (x.Flags != m_lastAgentUpdateArgs.Flags) || |
5550 | (x.State != lastarg.State) || | 5573 | (x.State != m_lastAgentUpdateArgs.State) || |
5551 | (x.HeadRotation != lastarg.HeadRotation) || | 5574 | (x.HeadRotation != m_lastAgentUpdateArgs.HeadRotation) || |
5552 | (x.SessionID != lastarg.SessionID) || | 5575 | (x.SessionID != m_lastAgentUpdateArgs.SessionID) || |
5553 | (x.AgentID != lastarg.AgentID) | 5576 | (x.AgentID != m_lastAgentUpdateArgs.AgentID) |
5554 | ); | 5577 | ); |
5555 | } | 5578 | } |
5556 | else | 5579 | else |
5557 | { | 5580 | { |
5581 | m_lastAgentUpdateArgs = new AgentUpdateArgs(); | ||
5558 | update = true; | 5582 | update = true; |
5559 | } | 5583 | } |
5560 | 5584 | ||
5561 | // These should be ordered from most-likely to | ||
5562 | // least likely to change. I've made an initial | ||
5563 | // guess at that. | ||
5564 | |||
5565 | if (update) | 5585 | if (update) |
5566 | { | 5586 | { |
5567 | // m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name); | 5587 | // m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name); |
5568 | 5588 | ||
5569 | AgentUpdateArgs arg = new AgentUpdateArgs(); | 5589 | m_lastAgentUpdateArgs.AgentID = x.AgentID; |
5570 | arg.AgentID = x.AgentID; | 5590 | m_lastAgentUpdateArgs.BodyRotation = x.BodyRotation; |
5571 | arg.BodyRotation = x.BodyRotation; | 5591 | m_lastAgentUpdateArgs.CameraAtAxis = x.CameraAtAxis; |
5572 | arg.CameraAtAxis = x.CameraAtAxis; | 5592 | m_lastAgentUpdateArgs.CameraCenter = x.CameraCenter; |
5573 | arg.CameraCenter = x.CameraCenter; | 5593 | m_lastAgentUpdateArgs.CameraLeftAxis = x.CameraLeftAxis; |
5574 | arg.CameraLeftAxis = x.CameraLeftAxis; | 5594 | m_lastAgentUpdateArgs.CameraUpAxis = x.CameraUpAxis; |
5575 | arg.CameraUpAxis = x.CameraUpAxis; | 5595 | m_lastAgentUpdateArgs.ControlFlags = x.ControlFlags; |
5576 | arg.ControlFlags = x.ControlFlags; | 5596 | m_lastAgentUpdateArgs.Far = x.Far; |
5577 | arg.Far = x.Far; | 5597 | m_lastAgentUpdateArgs.Flags = x.Flags; |
5578 | arg.Flags = x.Flags; | 5598 | m_lastAgentUpdateArgs.HeadRotation = x.HeadRotation; |
5579 | arg.HeadRotation = x.HeadRotation; | 5599 | m_lastAgentUpdateArgs.SessionID = x.SessionID; |
5580 | arg.SessionID = x.SessionID; | 5600 | m_lastAgentUpdateArgs.State = x.State; |
5581 | arg.State = x.State; | 5601 | |
5582 | UpdateAgent handlerAgentUpdate = OnAgentUpdate; | 5602 | UpdateAgent handlerAgentUpdate = OnAgentUpdate; |
5583 | UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate; | 5603 | UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate; |
5584 | lastarg = arg; // save this set of arguments for nexttime | 5604 | |
5585 | if (handlerPreAgentUpdate != null) | 5605 | if (handlerPreAgentUpdate != null) |
5586 | OnPreAgentUpdate(this, arg); | 5606 | OnPreAgentUpdate(this, m_lastAgentUpdateArgs); |
5607 | |||
5587 | if (handlerAgentUpdate != null) | 5608 | if (handlerAgentUpdate != null) |
5588 | OnAgentUpdate(this, arg); | 5609 | OnAgentUpdate(this, m_lastAgentUpdateArgs); |
5589 | 5610 | ||
5590 | handlerAgentUpdate = null; | 5611 | handlerAgentUpdate = null; |
5591 | handlerPreAgentUpdate = null; | 5612 | handlerPreAgentUpdate = null; |
5592 | } | 5613 | } |
5593 | } | 5614 | } |
5594 | 5615 | ||
5616 | PacketPool.Instance.ReturnPacket(packet); | ||
5617 | |||
5595 | return true; | 5618 | return true; |
5596 | } | 5619 | } |
5597 | 5620 | ||
@@ -5963,7 +5986,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5963 | msgpack.MessageBlock.ID, | 5986 | msgpack.MessageBlock.ID, |
5964 | msgpack.MessageBlock.Offline != 0 ? true : false, | 5987 | msgpack.MessageBlock.Offline != 0 ? true : false, |
5965 | msgpack.MessageBlock.Position, | 5988 | msgpack.MessageBlock.Position, |
5966 | msgpack.MessageBlock.BinaryBucket); | 5989 | msgpack.MessageBlock.BinaryBucket, |
5990 | true); | ||
5967 | 5991 | ||
5968 | handlerInstantMessage(this, im); | 5992 | handlerInstantMessage(this, im); |
5969 | } | 5993 | } |
@@ -9245,7 +9269,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9245 | } | 9269 | } |
9246 | #endregion | 9270 | #endregion |
9247 | 9271 | ||
9248 | switch (Utils.BytesToString(messagePacket.MethodData.Method)) | 9272 | string method = Utils.BytesToString(messagePacket.MethodData.Method); |
9273 | |||
9274 | switch (method) | ||
9249 | { | 9275 | { |
9250 | case "getinfo": | 9276 | case "getinfo": |
9251 | if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) | 9277 | if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) |
@@ -9561,7 +9587,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9561 | return true; | 9587 | return true; |
9562 | 9588 | ||
9563 | default: | 9589 | default: |
9564 | m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket); | 9590 | m_log.WarnFormat( |
9591 | "[LLCLIENTVIEW]: EstateOwnerMessage: Unknown method {0} requested for {1} in {2}", | ||
9592 | method, Name, Scene.Name); | ||
9593 | |||
9594 | for (int i = 0; i < messagePacket.ParamList.Length; i++) | ||
9595 | { | ||
9596 | EstateOwnerMessagePacket.ParamListBlock block = messagePacket.ParamList[i]; | ||
9597 | string data = (string)Utils.BytesToString(block.Parameter); | ||
9598 | m_log.DebugFormat("[LLCLIENTVIEW]: Param {0}={1}", i, data); | ||
9599 | } | ||
9600 | |||
9565 | return true; | 9601 | return true; |
9566 | } | 9602 | } |
9567 | 9603 | ||
@@ -11949,7 +11985,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11949 | logPacket = false; | 11985 | logPacket = false; |
11950 | 11986 | ||
11951 | if (DebugPacketLevel <= 50 | 11987 | if (DebugPacketLevel <= 50 |
11952 | & (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate)) | 11988 | && (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate)) |
11953 | logPacket = false; | 11989 | logPacket = false; |
11954 | 11990 | ||
11955 | if (DebugPacketLevel <= 25 && packet.Type == PacketType.ObjectPropertiesFamily) | 11991 | if (DebugPacketLevel <= 25 && packet.Type == PacketType.ObjectPropertiesFamily) |
@@ -12023,8 +12059,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12023 | 12059 | ||
12024 | if (!ProcessPacketMethod(packet)) | 12060 | if (!ProcessPacketMethod(packet)) |
12025 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); | 12061 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); |
12026 | |||
12027 | PacketPool.Instance.ReturnPacket(packet); | ||
12028 | } | 12062 | } |
12029 | 12063 | ||
12030 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) | 12064 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) |
@@ -12193,7 +12227,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12193 | { | 12227 | { |
12194 | Kick(reason); | 12228 | Kick(reason); |
12195 | Thread.Sleep(1000); | 12229 | Thread.Sleep(1000); |
12196 | Close(); | 12230 | Disconnect(); |
12197 | } | 12231 | } |
12198 | 12232 | ||
12199 | public void Disconnect() | 12233 | public void Disconnect() |
@@ -12481,7 +12515,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12481 | ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); | 12515 | ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); |
12482 | 12516 | ||
12483 | 12517 | ||
12484 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); | 12518 | ImprovedTerseObjectUpdatePacket packet |
12519 | = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket( | ||
12520 | PacketType.ImprovedTerseObjectUpdate); | ||
12521 | |||
12485 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | 12522 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
12486 | packet.RegionData.TimeDilation = timeDilation; | 12523 | packet.RegionData.TimeDilation = timeDilation; |
12487 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; | 12524 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; |