diff options
author | teravus | 2012-11-15 09:46:41 -0500 |
---|---|---|
committer | teravus | 2012-11-15 09:46:41 -0500 |
commit | dfac269032300872c4d0dc507f4f9062d102b0f4 (patch) | |
tree | d60fca83f54417c349c33b46de6ac65748ff762f /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |
parent | * Fixes mesh loading issues in last commit. (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.zip opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.tar.gz opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.tar.bz2 opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.tar.xz |
Merge master into teravuswork
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 169 |
1 files changed, 103 insertions, 66 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index ae9ed7f..c9aa4ca 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; |
@@ -355,7 +356,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
355 | private bool m_deliverPackets = true; | 356 | private bool m_deliverPackets = true; |
356 | private int m_animationSequenceNumber = 1; | 357 | private int m_animationSequenceNumber = 1; |
357 | private bool m_SendLogoutPacketWhenClosing = true; | 358 | private bool m_SendLogoutPacketWhenClosing = true; |
358 | private AgentUpdateArgs lastarg; | 359 | |
360 | /// <summary> | ||
361 | /// We retain a single AgentUpdateArgs so that we can constantly reuse it rather than construct a new one for | ||
362 | /// every single incoming AgentUpdate. Every client sends 10 AgentUpdate UDP messages per second, even if it | ||
363 | /// is doing absolutely nothing. | ||
364 | /// </summary> | ||
365 | /// <remarks> | ||
366 | /// This does mean that agent updates must be processed synchronously, at least for each client, and called methods | ||
367 | /// cannot retain a reference to it outside of that method. | ||
368 | /// </remarks> | ||
369 | private AgentUpdateArgs m_lastAgentUpdateArgs; | ||
359 | 370 | ||
360 | protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>(); | 371 | protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>(); |
361 | protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers | 372 | protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers |
@@ -510,19 +521,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
510 | /// </summary> | 521 | /// </summary> |
511 | public void Close() | 522 | public void Close() |
512 | { | 523 | { |
513 | Close(true); | 524 | Close(true, false); |
514 | } | 525 | } |
515 | 526 | ||
516 | /// <summary> | 527 | public void Close(bool sendStop, bool force) |
517 | /// Shut down the client view | ||
518 | /// </summary> | ||
519 | public void Close(bool sendStop) | ||
520 | { | 528 | { |
521 | // We lock here to prevent race conditions between two threads calling close simultaneously (e.g. | 529 | // We lock here to prevent race conditions between two threads calling close simultaneously (e.g. |
522 | // a simultaneous relog just as a client is being closed out due to no packet ack from the old connection. | 530 | // a simultaneous relog just as a client is being closed out due to no packet ack from the old connection. |
523 | lock (CloseSyncLock) | 531 | lock (CloseSyncLock) |
524 | { | 532 | { |
525 | if (!IsActive) | 533 | // We still perform a force close inside the sync lock since this is intended to attempt close where |
534 | // there is some unidentified connection problem, not where we have issues due to deadlock | ||
535 | if (!IsActive && !force) | ||
526 | return; | 536 | return; |
527 | 537 | ||
528 | IsActive = false; | 538 | IsActive = false; |
@@ -837,8 +847,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
837 | OutPacket(mov, ThrottleOutPacketType.Unknown); | 847 | OutPacket(mov, ThrottleOutPacketType.Unknown); |
838 | } | 848 | } |
839 | 849 | ||
840 | public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, | 850 | public void SendChatMessage( |
841 | UUID fromAgentID, byte source, byte audible) | 851 | string message, byte type, Vector3 fromPos, string fromName, |
852 | UUID fromAgentID, UUID ownerID, byte source, byte audible) | ||
842 | { | 853 | { |
843 | ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator); | 854 | ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator); |
844 | reply.ChatData.Audible = audible; | 855 | reply.ChatData.Audible = audible; |
@@ -847,7 +858,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
847 | reply.ChatData.SourceType = source; | 858 | reply.ChatData.SourceType = source; |
848 | reply.ChatData.Position = fromPos; | 859 | reply.ChatData.Position = fromPos; |
849 | reply.ChatData.FromName = Util.StringToBytes256(fromName); | 860 | reply.ChatData.FromName = Util.StringToBytes256(fromName); |
850 | reply.ChatData.OwnerID = fromAgentID; | 861 | reply.ChatData.OwnerID = ownerID; |
851 | reply.ChatData.SourceID = fromAgentID; | 862 | reply.ChatData.SourceID = fromAgentID; |
852 | 863 | ||
853 | OutPacket(reply, ThrottleOutPacketType.Unknown); | 864 | OutPacket(reply, ThrottleOutPacketType.Unknown); |
@@ -3985,7 +3996,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3985 | { | 3996 | { |
3986 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value; | 3997 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value; |
3987 | 3998 | ||
3988 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); | 3999 | ImprovedTerseObjectUpdatePacket packet |
4000 | = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); | ||
3989 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | 4001 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
3990 | packet.RegionData.TimeDilation = timeDilation; | 4002 | packet.RegionData.TimeDilation = timeDilation; |
3991 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | 4003 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; |
@@ -4030,7 +4042,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4030 | { | 4042 | { |
4031 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value; | 4043 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value; |
4032 | 4044 | ||
4033 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); | 4045 | ImprovedTerseObjectUpdatePacket packet |
4046 | = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket( | ||
4047 | PacketType.ImprovedTerseObjectUpdate); | ||
4034 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | 4048 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
4035 | packet.RegionData.TimeDilation = timeDilation; | 4049 | packet.RegionData.TimeDilation = timeDilation; |
4036 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | 4050 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; |
@@ -4038,7 +4052,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4038 | for (int i = 0; i < blocks.Count; i++) | 4052 | for (int i = 0; i < blocks.Count; i++) |
4039 | packet.ObjectData[i] = blocks[i]; | 4053 | packet.ObjectData[i] = blocks[i]; |
4040 | 4054 | ||
4041 | OutPacket(packet, ThrottleOutPacketType.Task, true); | 4055 | OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); |
4042 | } | 4056 | } |
4043 | 4057 | ||
4044 | #endregion Packet Sending | 4058 | #endregion Packet Sending |
@@ -4535,7 +4549,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4535 | { | 4549 | { |
4536 | returnblock[j] = new EstateOwnerMessagePacket.ParamListBlock(); | 4550 | returnblock[j] = new EstateOwnerMessagePacket.ParamListBlock(); |
4537 | } | 4551 | } |
4538 | j = 0; | 4552 | j = 0; |
4539 | 4553 | ||
4540 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; | 4554 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; |
4541 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; | 4555 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; |
@@ -5039,7 +5053,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5039 | Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Y, -64.0f, 64.0f), data, pos); pos += 2; | 5053 | Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Y, -64.0f, 64.0f), data, pos); pos += 2; |
5040 | Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2; | 5054 | Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2; |
5041 | 5055 | ||
5042 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock block = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); | 5056 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock block |
5057 | = PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | ||
5058 | |||
5043 | block.Data = data; | 5059 | block.Data = data; |
5044 | 5060 | ||
5045 | if (textureEntry != null && textureEntry.Length > 0) | 5061 | if (textureEntry != null && textureEntry.Length > 0) |
@@ -5289,14 +5305,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5289 | protected virtual void RegisterLocalPacketHandlers() | 5305 | protected virtual void RegisterLocalPacketHandlers() |
5290 | { | 5306 | { |
5291 | AddLocalPacketHandler(PacketType.LogoutRequest, HandleLogout); | 5307 | AddLocalPacketHandler(PacketType.LogoutRequest, HandleLogout); |
5308 | |||
5309 | // If AgentUpdate is ever handled asynchronously, then we will also need to construct a new AgentUpdateArgs | ||
5310 | // for each AgentUpdate packet. | ||
5292 | AddLocalPacketHandler(PacketType.AgentUpdate, HandleAgentUpdate, false); | 5311 | AddLocalPacketHandler(PacketType.AgentUpdate, HandleAgentUpdate, false); |
5312 | |||
5293 | AddLocalPacketHandler(PacketType.ViewerEffect, HandleViewerEffect, false); | 5313 | AddLocalPacketHandler(PacketType.ViewerEffect, HandleViewerEffect, false); |
5294 | AddLocalPacketHandler(PacketType.AgentCachedTexture, HandleAgentTextureCached, false); | 5314 | AddLocalPacketHandler(PacketType.AgentCachedTexture, HandleAgentTextureCached, false); |
5295 | AddLocalPacketHandler(PacketType.MultipleObjectUpdate, HandleMultipleObjUpdate, false); | 5315 | AddLocalPacketHandler(PacketType.MultipleObjectUpdate, HandleMultipleObjUpdate, false); |
5296 | AddLocalPacketHandler(PacketType.MoneyTransferRequest, HandleMoneyTransferRequest, false); | 5316 | AddLocalPacketHandler(PacketType.MoneyTransferRequest, HandleMoneyTransferRequest, false); |
5297 | AddLocalPacketHandler(PacketType.ParcelBuy, HandleParcelBuyRequest, false); | 5317 | AddLocalPacketHandler(PacketType.ParcelBuy, HandleParcelBuyRequest, false); |
5298 | AddLocalPacketHandler(PacketType.UUIDGroupNameRequest, HandleUUIDGroupNameRequest, false); | 5318 | AddLocalPacketHandler(PacketType.UUIDGroupNameRequest, HandleUUIDGroupNameRequest); |
5299 | AddLocalPacketHandler(PacketType.ObjectGroup, HandleObjectGroupRequest, false); | 5319 | AddLocalPacketHandler(PacketType.ObjectGroup, HandleObjectGroupRequest); |
5300 | AddLocalPacketHandler(PacketType.GenericMessage, HandleGenericMessage); | 5320 | AddLocalPacketHandler(PacketType.GenericMessage, HandleGenericMessage); |
5301 | AddLocalPacketHandler(PacketType.AvatarPropertiesRequest, HandleAvatarPropertiesRequest); | 5321 | AddLocalPacketHandler(PacketType.AvatarPropertiesRequest, HandleAvatarPropertiesRequest); |
5302 | AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer); | 5322 | AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer); |
@@ -5518,81 +5538,84 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5518 | 5538 | ||
5519 | #region Scene/Avatar | 5539 | #region Scene/Avatar |
5520 | 5540 | ||
5521 | private bool HandleAgentUpdate(IClientAPI sener, Packet Pack) | 5541 | private bool HandleAgentUpdate(IClientAPI sener, Packet packet) |
5522 | { | 5542 | { |
5523 | if (OnAgentUpdate != null) | 5543 | if (OnAgentUpdate != null) |
5524 | { | 5544 | { |
5525 | bool update = false; | 5545 | AgentUpdatePacket agentUpdate = (AgentUpdatePacket)packet; |
5526 | AgentUpdatePacket agenUpdate = (AgentUpdatePacket)Pack; | ||
5527 | 5546 | ||
5528 | #region Packet Session and User Check | 5547 | #region Packet Session and User Check |
5529 | if (agenUpdate.AgentData.SessionID != SessionId || agenUpdate.AgentData.AgentID != AgentId) | 5548 | if (agentUpdate.AgentData.SessionID != SessionId || agentUpdate.AgentData.AgentID != AgentId) |
5549 | { | ||
5550 | PacketPool.Instance.ReturnPacket(packet); | ||
5530 | return false; | 5551 | return false; |
5552 | } | ||
5531 | #endregion | 5553 | #endregion |
5532 | 5554 | ||
5533 | AgentUpdatePacket.AgentDataBlock x = agenUpdate.AgentData; | 5555 | bool update = false; |
5534 | 5556 | AgentUpdatePacket.AgentDataBlock x = agentUpdate.AgentData; | |
5535 | // We can only check when we have something to check | ||
5536 | // against. | ||
5537 | 5557 | ||
5538 | if (lastarg != null) | 5558 | if (m_lastAgentUpdateArgs != null) |
5539 | { | 5559 | { |
5560 | // These should be ordered from most-likely to | ||
5561 | // least likely to change. I've made an initial | ||
5562 | // guess at that. | ||
5540 | update = | 5563 | update = |
5541 | ( | 5564 | ( |
5542 | (x.BodyRotation != lastarg.BodyRotation) || | 5565 | (x.BodyRotation != m_lastAgentUpdateArgs.BodyRotation) || |
5543 | (x.CameraAtAxis != lastarg.CameraAtAxis) || | 5566 | (x.CameraAtAxis != m_lastAgentUpdateArgs.CameraAtAxis) || |
5544 | (x.CameraCenter != lastarg.CameraCenter) || | 5567 | (x.CameraCenter != m_lastAgentUpdateArgs.CameraCenter) || |
5545 | (x.CameraLeftAxis != lastarg.CameraLeftAxis) || | 5568 | (x.CameraLeftAxis != m_lastAgentUpdateArgs.CameraLeftAxis) || |
5546 | (x.CameraUpAxis != lastarg.CameraUpAxis) || | 5569 | (x.CameraUpAxis != m_lastAgentUpdateArgs.CameraUpAxis) || |
5547 | (x.ControlFlags != lastarg.ControlFlags) || | 5570 | (x.ControlFlags != m_lastAgentUpdateArgs.ControlFlags) || |
5548 | (x.ControlFlags != 0) || | 5571 | (x.ControlFlags != 0) || |
5549 | (x.Far != lastarg.Far) || | 5572 | (x.Far != m_lastAgentUpdateArgs.Far) || |
5550 | (x.Flags != lastarg.Flags) || | 5573 | (x.Flags != m_lastAgentUpdateArgs.Flags) || |
5551 | (x.State != lastarg.State) || | 5574 | (x.State != m_lastAgentUpdateArgs.State) || |
5552 | (x.HeadRotation != lastarg.HeadRotation) || | 5575 | (x.HeadRotation != m_lastAgentUpdateArgs.HeadRotation) || |
5553 | (x.SessionID != lastarg.SessionID) || | 5576 | (x.SessionID != m_lastAgentUpdateArgs.SessionID) || |
5554 | (x.AgentID != lastarg.AgentID) | 5577 | (x.AgentID != m_lastAgentUpdateArgs.AgentID) |
5555 | ); | 5578 | ); |
5556 | } | 5579 | } |
5557 | else | 5580 | else |
5558 | { | 5581 | { |
5582 | m_lastAgentUpdateArgs = new AgentUpdateArgs(); | ||
5559 | update = true; | 5583 | update = true; |
5560 | } | 5584 | } |
5561 | 5585 | ||
5562 | // These should be ordered from most-likely to | ||
5563 | // least likely to change. I've made an initial | ||
5564 | // guess at that. | ||
5565 | |||
5566 | if (update) | 5586 | if (update) |
5567 | { | 5587 | { |
5568 | // m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name); | 5588 | // m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name); |
5569 | 5589 | ||
5570 | AgentUpdateArgs arg = new AgentUpdateArgs(); | 5590 | m_lastAgentUpdateArgs.AgentID = x.AgentID; |
5571 | arg.AgentID = x.AgentID; | 5591 | m_lastAgentUpdateArgs.BodyRotation = x.BodyRotation; |
5572 | arg.BodyRotation = x.BodyRotation; | 5592 | m_lastAgentUpdateArgs.CameraAtAxis = x.CameraAtAxis; |
5573 | arg.CameraAtAxis = x.CameraAtAxis; | 5593 | m_lastAgentUpdateArgs.CameraCenter = x.CameraCenter; |
5574 | arg.CameraCenter = x.CameraCenter; | 5594 | m_lastAgentUpdateArgs.CameraLeftAxis = x.CameraLeftAxis; |
5575 | arg.CameraLeftAxis = x.CameraLeftAxis; | 5595 | m_lastAgentUpdateArgs.CameraUpAxis = x.CameraUpAxis; |
5576 | arg.CameraUpAxis = x.CameraUpAxis; | 5596 | m_lastAgentUpdateArgs.ControlFlags = x.ControlFlags; |
5577 | arg.ControlFlags = x.ControlFlags; | 5597 | m_lastAgentUpdateArgs.Far = x.Far; |
5578 | arg.Far = x.Far; | 5598 | m_lastAgentUpdateArgs.Flags = x.Flags; |
5579 | arg.Flags = x.Flags; | 5599 | m_lastAgentUpdateArgs.HeadRotation = x.HeadRotation; |
5580 | arg.HeadRotation = x.HeadRotation; | 5600 | m_lastAgentUpdateArgs.SessionID = x.SessionID; |
5581 | arg.SessionID = x.SessionID; | 5601 | m_lastAgentUpdateArgs.State = x.State; |
5582 | arg.State = x.State; | 5602 | |
5583 | UpdateAgent handlerAgentUpdate = OnAgentUpdate; | 5603 | UpdateAgent handlerAgentUpdate = OnAgentUpdate; |
5584 | UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate; | 5604 | UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate; |
5585 | lastarg = arg; // save this set of arguments for nexttime | 5605 | |
5586 | if (handlerPreAgentUpdate != null) | 5606 | if (handlerPreAgentUpdate != null) |
5587 | OnPreAgentUpdate(this, arg); | 5607 | OnPreAgentUpdate(this, m_lastAgentUpdateArgs); |
5608 | |||
5588 | if (handlerAgentUpdate != null) | 5609 | if (handlerAgentUpdate != null) |
5589 | OnAgentUpdate(this, arg); | 5610 | OnAgentUpdate(this, m_lastAgentUpdateArgs); |
5590 | 5611 | ||
5591 | handlerAgentUpdate = null; | 5612 | handlerAgentUpdate = null; |
5592 | handlerPreAgentUpdate = null; | 5613 | handlerPreAgentUpdate = null; |
5593 | } | 5614 | } |
5594 | } | 5615 | } |
5595 | 5616 | ||
5617 | PacketPool.Instance.ReturnPacket(packet); | ||
5618 | |||
5596 | return true; | 5619 | return true; |
5597 | } | 5620 | } |
5598 | 5621 | ||
@@ -5964,7 +5987,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5964 | msgpack.MessageBlock.ID, | 5987 | msgpack.MessageBlock.ID, |
5965 | msgpack.MessageBlock.Offline != 0 ? true : false, | 5988 | msgpack.MessageBlock.Offline != 0 ? true : false, |
5966 | msgpack.MessageBlock.Position, | 5989 | msgpack.MessageBlock.Position, |
5967 | msgpack.MessageBlock.BinaryBucket); | 5990 | msgpack.MessageBlock.BinaryBucket, |
5991 | true); | ||
5968 | 5992 | ||
5969 | handlerInstantMessage(this, im); | 5993 | handlerInstantMessage(this, im); |
5970 | } | 5994 | } |
@@ -9251,7 +9275,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9251 | } | 9275 | } |
9252 | #endregion | 9276 | #endregion |
9253 | 9277 | ||
9254 | switch (Utils.BytesToString(messagePacket.MethodData.Method)) | 9278 | string method = Utils.BytesToString(messagePacket.MethodData.Method); |
9279 | |||
9280 | switch (method) | ||
9255 | { | 9281 | { |
9256 | case "getinfo": | 9282 | case "getinfo": |
9257 | if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) | 9283 | if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) |
@@ -9567,7 +9593,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9567 | return true; | 9593 | return true; |
9568 | 9594 | ||
9569 | default: | 9595 | default: |
9570 | m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket); | 9596 | m_log.WarnFormat( |
9597 | "[LLCLIENTVIEW]: EstateOwnerMessage: Unknown method {0} requested for {1} in {2}", | ||
9598 | method, Name, Scene.Name); | ||
9599 | |||
9600 | for (int i = 0; i < messagePacket.ParamList.Length; i++) | ||
9601 | { | ||
9602 | EstateOwnerMessagePacket.ParamListBlock block = messagePacket.ParamList[i]; | ||
9603 | string data = (string)Utils.BytesToString(block.Parameter); | ||
9604 | m_log.DebugFormat("[LLCLIENTVIEW]: Param {0}={1}", i, data); | ||
9605 | } | ||
9606 | |||
9571 | return true; | 9607 | return true; |
9572 | } | 9608 | } |
9573 | 9609 | ||
@@ -11960,7 +11996,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11960 | logPacket = false; | 11996 | logPacket = false; |
11961 | 11997 | ||
11962 | if (DebugPacketLevel <= 50 | 11998 | if (DebugPacketLevel <= 50 |
11963 | & (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate)) | 11999 | && (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate)) |
11964 | logPacket = false; | 12000 | logPacket = false; |
11965 | 12001 | ||
11966 | if (DebugPacketLevel <= 25 && packet.Type == PacketType.ObjectPropertiesFamily) | 12002 | if (DebugPacketLevel <= 25 && packet.Type == PacketType.ObjectPropertiesFamily) |
@@ -12034,8 +12070,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12034 | 12070 | ||
12035 | if (!ProcessPacketMethod(packet)) | 12071 | if (!ProcessPacketMethod(packet)) |
12036 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); | 12072 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); |
12037 | |||
12038 | PacketPool.Instance.ReturnPacket(packet); | ||
12039 | } | 12073 | } |
12040 | 12074 | ||
12041 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) | 12075 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) |
@@ -12204,7 +12238,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12204 | { | 12238 | { |
12205 | Kick(reason); | 12239 | Kick(reason); |
12206 | Thread.Sleep(1000); | 12240 | Thread.Sleep(1000); |
12207 | Close(); | 12241 | Disconnect(); |
12208 | } | 12242 | } |
12209 | 12243 | ||
12210 | public void Disconnect() | 12244 | public void Disconnect() |
@@ -12492,7 +12526,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12492 | ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); | 12526 | ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); |
12493 | 12527 | ||
12494 | 12528 | ||
12495 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); | 12529 | ImprovedTerseObjectUpdatePacket packet |
12530 | = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket( | ||
12531 | PacketType.ImprovedTerseObjectUpdate); | ||
12532 | |||
12496 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | 12533 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
12497 | packet.RegionData.TimeDilation = timeDilation; | 12534 | packet.RegionData.TimeDilation = timeDilation; |
12498 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; | 12535 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; |