From b0cbf16c19495814920e138deba4d1bb47615582 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 26 Apr 2012 16:04:49 +0100 Subject: minor: Add region name to dropped inbound packet message --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index fb6b11e..d05f72f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1350,7 +1350,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - m_log.DebugFormat("[LLUDPSERVER]: Dropping incoming {0} packet for dead client {1}", packet.Type, udpClient.AgentID); + m_log.DebugFormat( + "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}", + packet.Type, udpClient.AgentID, m_scene.RegionInfo.RegionName); } } -- cgit v1.1 From cb6791fb30ce0fbe416f42d95b9737f9f30e02a7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 26 Apr 2012 22:35:25 +0100 Subject: Tweak log messages on local region to region teleport path to help with problem resolution. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index d05f72f..edf91cb 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -916,7 +916,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; - m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); + m_log.DebugFormat( + "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} from {1}", + uccp.CircuitCode.Code, buffer.RemoteEndPoint); remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; -- cgit v1.1 From 07e62df5582e28675275b3f5143ec37e5697d283 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Apr 2012 00:58:54 +0100 Subject: Add regression test for teleporting an agent between separated regions on the same simulator. This involves a large amount of change in test scene setup code to allow test scenes to share shared modules SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static May split these out into separate classes in the future. --- OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs | 2 +- OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs index a575e36..1321470 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs @@ -158,7 +158,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests TestHelpers.InMethod(); // XmlConfigurator.Configure(); - TestScene scene = SceneHelpers.SetupScene(); + TestScene scene = new SceneHelpers().SetupScene(); uint myCircuitCode = 123456; UUID myAgentUuid = TestHelpers.ParseTail(0x1); UUID mySessionUuid = TestHelpers.ParseTail(0x2); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs index 1b68d68..221f02b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs @@ -79,7 +79,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests J2KDecoderModule j2kdm = new J2KDecoderModule(); - scene = SceneHelpers.SetupScene(); + scene = new SceneHelpers().SetupScene(); SceneHelpers.SetupSceneModules(scene, j2kdm); tc = new TestClient(SceneHelpers.GenerateAgentData(userId), scene); -- cgit v1.1 From a90b0e302c110068cec0ee7109e796d2d5fdab4d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Apr 2012 23:46:33 +0100 Subject: Revert "Implement bulk inventory update over CAPS (not recursive by design," This reverts commit 6e7f13a72d4e43f8ca564247e0b56bf5706bbdb1. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 48 +--------------------- 1 file changed, 1 insertion(+), 47 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index ae5cbff..36ef281 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12296,7 +12296,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP ItemData.Add(ItemDataMap); } - llsd.Add("InventoryData", ItemData); + llsd.Add("ItemData", ItemData); eq.Enqueue(BuildEvent("RemoveInventoryItem", llsd), AgentId); @@ -12340,14 +12340,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP llsd), AgentId); } - private byte[] EncodeU32(uint val) - { - byte[] ret = BitConverter.GetBytes(val); - if (BitConverter.IsLittleEndian) - Array.Reverse(ret); - return ret; - } - public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items) { IEventQueue eq = Scene.RequestModuleInterface(); @@ -12363,7 +12355,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP OSDMap AgentDataMap = new OSDMap(1); AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId)); AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId)); - AgentDataMap.Add("TransactionID", OSD.FromUUID(UUID.Random())); OSDArray AgentData = new OSDArray(1); AgentData.Add(AgentDataMap); @@ -12391,47 +12382,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP foreach (InventoryItemBase item in items) { OSDMap ItemDataMap = new OSDMap(); - - ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID)); - ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder)); - - ItemDataMap.Add("CreatorID", OSD.FromUUID(item.CreatorIdAsUuid)); - ItemDataMap.Add("OwnerID", OSD.FromUUID(item.Owner)); - ItemDataMap.Add("GroupID", OSD.FromUUID(item.GroupID)); - ItemDataMap.Add("BaseMask", OSD.FromBinary(EncodeU32((uint)item.BasePermissions))); - ItemDataMap.Add("OwnerMask", OSD.FromBinary(EncodeU32((uint)item.CurrentPermissions))); - ItemDataMap.Add("GroupMask", OSD.FromBinary(EncodeU32((uint)item.GroupPermissions))); - ItemDataMap.Add("EveryoneMask", OSD.FromBinary(EncodeU32((uint)item.EveryOnePermissions))); - ItemDataMap.Add("NextOwnerMask", OSD.FromBinary(EncodeU32((uint)item.NextPermissions))); - ItemDataMap.Add("GroupOwned", OSD.FromBoolean(item.GroupOwned)); - ItemDataMap.Add("AssetID", OSD.FromUUID(item.AssetID)); - ItemDataMap.Add("Type", OSD.FromInteger(item.AssetType)); - ItemDataMap.Add("InvType", OSD.FromInteger(item.InvType)); - ItemDataMap.Add("Flags", OSD.FromBinary(EncodeU32((uint)item.Flags))); - ItemDataMap.Add("SaleType", OSD.FromInteger((byte)item.SaleType)); - ItemDataMap.Add("SalePrice", OSD.FromInteger(item.SalePrice)); - ItemDataMap.Add("Name", OSD.FromString(item.Name)); - ItemDataMap.Add("Description", OSD.FromString(item.Description)); - ItemDataMap.Add("CreationDate", OSD.FromInteger(item.CreationDate)); - - ItemDataMap.Add("CRC", OSD.FromBinary(EncodeU32( - Helpers.InventoryCRC(1000, 0, (sbyte)item.InvType, - (sbyte)item.AssetType, item.AssetID, - item.GroupID, 100, - item.Owner, item.CreatorIdAsUuid, - item.ID, item.Folder, - (uint)PermissionMask.All, 1, (uint)PermissionMask.All, (uint)PermissionMask.All, - (uint)PermissionMask.All) - ))); - ItemDataMap.Add("CallbackID", 0); - ItemData.Add(ItemDataMap); } llsd.Add("ItemData", ItemData); - - eq.Enqueue(BuildEvent("BulkUpdateInventory", - llsd), AgentId); } } } -- cgit v1.1 From ab71779221d580410e8b1c07e94f89ca933f9855 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Apr 2012 23:54:45 +0100 Subject: Revert "Revert "Implement bulk inventory update over CAPS (not recursive by design,"" This reverts commit a90b0e302c110068cec0ee7109e796d2d5fdab4d. Sorry, accidentally reverted this completely by mistake, reverting the revert. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 48 +++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 36ef281..ae5cbff 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12296,7 +12296,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP ItemData.Add(ItemDataMap); } - llsd.Add("ItemData", ItemData); + llsd.Add("InventoryData", ItemData); eq.Enqueue(BuildEvent("RemoveInventoryItem", llsd), AgentId); @@ -12340,6 +12340,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP llsd), AgentId); } + private byte[] EncodeU32(uint val) + { + byte[] ret = BitConverter.GetBytes(val); + if (BitConverter.IsLittleEndian) + Array.Reverse(ret); + return ret; + } + public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items) { IEventQueue eq = Scene.RequestModuleInterface(); @@ -12355,6 +12363,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OSDMap AgentDataMap = new OSDMap(1); AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId)); AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId)); + AgentDataMap.Add("TransactionID", OSD.FromUUID(UUID.Random())); OSDArray AgentData = new OSDArray(1); AgentData.Add(AgentDataMap); @@ -12382,10 +12391,47 @@ namespace OpenSim.Region.ClientStack.LindenUDP foreach (InventoryItemBase item in items) { OSDMap ItemDataMap = new OSDMap(); + + ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID)); + ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder)); + + ItemDataMap.Add("CreatorID", OSD.FromUUID(item.CreatorIdAsUuid)); + ItemDataMap.Add("OwnerID", OSD.FromUUID(item.Owner)); + ItemDataMap.Add("GroupID", OSD.FromUUID(item.GroupID)); + ItemDataMap.Add("BaseMask", OSD.FromBinary(EncodeU32((uint)item.BasePermissions))); + ItemDataMap.Add("OwnerMask", OSD.FromBinary(EncodeU32((uint)item.CurrentPermissions))); + ItemDataMap.Add("GroupMask", OSD.FromBinary(EncodeU32((uint)item.GroupPermissions))); + ItemDataMap.Add("EveryoneMask", OSD.FromBinary(EncodeU32((uint)item.EveryOnePermissions))); + ItemDataMap.Add("NextOwnerMask", OSD.FromBinary(EncodeU32((uint)item.NextPermissions))); + ItemDataMap.Add("GroupOwned", OSD.FromBoolean(item.GroupOwned)); + ItemDataMap.Add("AssetID", OSD.FromUUID(item.AssetID)); + ItemDataMap.Add("Type", OSD.FromInteger(item.AssetType)); + ItemDataMap.Add("InvType", OSD.FromInteger(item.InvType)); + ItemDataMap.Add("Flags", OSD.FromBinary(EncodeU32((uint)item.Flags))); + ItemDataMap.Add("SaleType", OSD.FromInteger((byte)item.SaleType)); + ItemDataMap.Add("SalePrice", OSD.FromInteger(item.SalePrice)); + ItemDataMap.Add("Name", OSD.FromString(item.Name)); + ItemDataMap.Add("Description", OSD.FromString(item.Description)); + ItemDataMap.Add("CreationDate", OSD.FromInteger(item.CreationDate)); + + ItemDataMap.Add("CRC", OSD.FromBinary(EncodeU32( + Helpers.InventoryCRC(1000, 0, (sbyte)item.InvType, + (sbyte)item.AssetType, item.AssetID, + item.GroupID, 100, + item.Owner, item.CreatorIdAsUuid, + item.ID, item.Folder, + (uint)PermissionMask.All, 1, (uint)PermissionMask.All, (uint)PermissionMask.All, + (uint)PermissionMask.All) + ))); + ItemDataMap.Add("CallbackID", 0); + ItemData.Add(ItemDataMap); } llsd.Add("ItemData", ItemData); + + eq.Enqueue(BuildEvent("BulkUpdateInventory", + llsd), AgentId); } } } -- cgit v1.1 From 9d2e1c67a8969e4769006c7347505b58a7827b3f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 1 May 2012 23:14:12 +0100 Subject: Add regression test for teleporting between neighbouring regions on the same simulator This adds a non-advertised wait_for_callback option in [EntityTransfer]. Default is always true. Teleport tests disable the wait for callback from the destination region in order to run within a single thread. --- OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs index 221f02b..5fcf376 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs @@ -79,7 +79,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests J2KDecoderModule j2kdm = new J2KDecoderModule(); - scene = new SceneHelpers().SetupScene(); + SceneHelpers sceneHelpers = new SceneHelpers(); + scene = sceneHelpers.SetupScene(); SceneHelpers.SetupSceneModules(scene, j2kdm); tc = new TestClient(SceneHelpers.GenerateAgentData(userId), scene); -- cgit v1.1 From 6987aef38dbc4f5c24b6e2cc73601f9a7c5f4431 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 9 May 2012 23:12:30 +0100 Subject: Improve logging on the prim inventory script asset request path for future use. This adds name and description of the request handler to http request logging when DebugLevel >= 1 --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index ae5cbff..4d6081c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -11955,21 +11955,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID) { UUID requestID = UUID.Zero; - if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) + int sourceType = transferRequest.TransferInfo.SourceType; + + if (sourceType == (int)SourceType.Asset) { requestID = new UUID(transferRequest.TransferInfo.Params, 0); } - else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) + else if (sourceType == (int)SourceType.SimInventoryItem) { requestID = new UUID(transferRequest.TransferInfo.Params, 80); } - else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimEstate) + else if (sourceType == (int)SourceType.SimEstate) { requestID = taskID; } - -// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID); +// m_log.DebugFormat( +// "[LLCLIENTVIEW]: Received transfer request for {0} in {1} type {2} by {3}", +// requestID, taskID, (SourceType)sourceType, Name); m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived); } -- cgit v1.1 From 008c6a4610fa7b710a9e2546cc09d9fee57e5795 Mon Sep 17 00:00:00 2001 From: Talun Date: Fri, 1 Jun 2012 00:39:26 +0100 Subject: Mantis 4597 AgentPaused packet is ignored. The packet was actually being handled but not acted on. This change extends the default timeout for paused clients to 5 minutes and makes both the paused and non-paused timeout periods configurable. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index edf91cb..32ba590 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -155,7 +155,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP private int m_defaultRTO = 0; private int m_maxRTO = 0; - + private int m_ackTimeout = 0; + private int m_pausedAckTimeout = 0; private bool m_disableFacelights = false; public Socket Server { get { return null; } } @@ -198,11 +199,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_defaultRTO = config.GetInt("DefaultRTO", 0); m_maxRTO = config.GetInt("MaxRTO", 0); m_disableFacelights = config.GetBoolean("DisableFacelights", false); + m_ackTimeout = 1000 * config.GetInt("AckTimeout", 60); + m_pausedAckTimeout = 1000 * config.GetInt("PausedAckTimeout", 300); } else { PrimUpdatesPerCallback = 100; TextureSendLimit = 20; + m_ackTimeout = 1000 * 60; // 1 minute + m_pausedAckTimeout = 1000 * 300; // 5 minutes } #region BinaryStats @@ -491,8 +496,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP return; // Disconnect an agent if no packets are received for some time - //FIXME: Make 60 an .ini setting - if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > 1000 * 60) + int timeoutTicks = m_ackTimeout; + + // Allow more slack if the client is "paused" eg file upload dialogue is open + // Some sort of limit is needed in case the client crashes, loses its network connection + // or some other disaster prevents it from sendung the AgentResume + if (udpClient.IsPaused) + timeoutTicks = m_pausedAckTimeout; + + if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks) { m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); -- cgit v1.1 From 34cb8a2ab3189952cb74a16cf5246a2da3847b7c Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 6 Jun 2012 20:35:00 +0200 Subject: Fix not sending TransferInfo when an asset is not found. This clogs up the sound pipeline in the viewer. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 33 +++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 9895402..18d8045 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -2777,6 +2777,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + public void SendAssetNotFound(AssetRequestToClient req) + { + TransferInfoPacket Transfer = new TransferInfoPacket(); + Transfer.TransferInfo.ChannelType = 2; + Transfer.TransferInfo.Status = -2; + Transfer.TransferInfo.TargetType = 0; + Transfer.TransferInfo.Params = req.Params; + Transfer.TransferInfo.Size = 0; + Transfer.TransferInfo.TransferID = req.TransferRequestID; + Transfer.Header.Zerocoded = true; + OutPacket(Transfer, ThrottleOutPacketType.Asset); + } + public void SendTexture(AssetBase TextureAsset) { @@ -12181,14 +12194,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// protected void AssetReceived(string id, Object sender, AssetBase asset) { - if (asset == null) - return; - TransferRequestPacket transferRequest = (TransferRequestPacket)sender; UUID requestID = UUID.Zero; byte source = (byte)SourceType.Asset; + AssetRequestToClient req = new AssetRequestToClient(); + + if (asset == null) + { + req.AssetInf = null; + req.AssetRequestSource = source; + req.IsTextureRequest = false; + req.NumPackets = 0; + req.Params = transferRequest.TransferInfo.Params; + req.RequestAssetID = requestID; + req.TransferRequestID = transferRequest.TransferInfo.TransferID; + + SendAssetNotFound(req); + return; + } + if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) { requestID = new UUID(transferRequest.TransferInfo.Params, 0); @@ -12205,7 +12231,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP return; // The asset is known to exist and is in our cache, so add it to the AssetRequests list - AssetRequestToClient req = new AssetRequestToClient(); req.AssetInf = asset; req.AssetRequestSource = source; req.IsTextureRequest = false; -- cgit v1.1 From 98b46d48fefc7801b7c9e496000e9329f4266e5e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 7 Jun 2012 02:44:13 +0100 Subject: Allow the thread watchdog to accept an alarm method that is invoked if the timeout is breached. This alarm can then invoke this to log extra information. This is used in LLUDPServer to show which client was being processed when incoming and outgoing udp watchdog alarms are triggered. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 69 ++++++++++++++++++++-- 1 file changed, 64 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 32ba590..e37adb8 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -163,6 +163,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP private int m_malformedCount = 0; // Guard against a spamming attack + /// + /// Record current outgoing client for monitoring purposes. + /// + private IClientAPI m_currentOutgoingClient; + + /// + /// Recording current incoming client for monitoring purposes. + /// + private IClientAPI m_currentIncomingClient; + public LLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager) : base(listenIP, (int)port) { @@ -244,19 +254,56 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_scene == null) throw new InvalidOperationException("[LLUDPSERVER]: Cannot LLUDPServer.Start() without an IScene reference"); - m_log.Info("[LLUDPSERVER]: Starting the LLUDP server in " + (m_asyncPacketHandling ? "asynchronous" : "synchronous") + " mode"); + m_log.InfoFormat( + "[LLUDPSERVER]: Starting the LLUDP server in {0} mode", + m_asyncPacketHandling ? "asynchronous" : "synchronous"); base.Start(m_recvBufferSize, m_asyncPacketHandling); // Start the packet processing threads Watchdog.StartThread( - IncomingPacketHandler, "Incoming Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false, true); + IncomingPacketHandler, + string.Format("Incoming Packets ({0})", m_scene.RegionInfo.RegionName), + ThreadPriority.Normal, + false, + true, + GetWatchdogIncomingAlarmData, + Watchdog.WATCHDOG_TIMEOUT_MS); + Watchdog.StartThread( - OutgoingPacketHandler, "Outgoing Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false, true); + OutgoingPacketHandler, + string.Format("Outgoing Packets ({0})", m_scene.RegionInfo.RegionName), + ThreadPriority.Normal, + false, + true, + GetWatchdogOutgoingAlarmData, + Watchdog.WATCHDOG_TIMEOUT_MS); m_elapsedMSSinceLastStatReport = Environment.TickCount; } + /// + /// If the outgoing UDP thread times out, then return client that was being processed to help with debugging. + /// + /// + private string GetWatchdogIncomingAlarmData() + { + return string.Format( + "Client is {0}", + m_currentIncomingClient != null ? m_currentIncomingClient.Name : "none"); + } + + /// + /// If the outgoing UDP thread times out, then return client that was being processed to help with debugging. + /// + /// + private string GetWatchdogOutgoingAlarmData() + { + return string.Format( + "Client is {0}", + m_currentOutgoingClient != null ? m_currentOutgoingClient.Name : "none"); + } + public new void Stop() { m_log.Info("[LLUDPSERVER]: Shutting down the LLUDP server for " + m_scene.RegionInfo.RegionName); @@ -1173,6 +1220,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP // client. m_packetSent will be set to true if a packet is sent m_scene.ForEachClient(clientPacketHandler); + m_currentOutgoingClient = null; + // If nothing was sent, sleep for the minimum amount of time before a // token bucket could get more tokens if (!m_packetSent) @@ -1191,6 +1240,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void ClientOutgoingPacketHandler(IClientAPI client) { + m_currentOutgoingClient = client; + try { if (client is LLClientView) @@ -1216,8 +1267,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP } catch (Exception ex) { - m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler iteration for " + client.Name + - " threw an exception: " + ex.Message, ex); + m_log.Error( + string.Format("[LLUDPSERVER]: OutgoingPacketHandler iteration for {0} threw ", client.Name), ex); } } @@ -1243,6 +1294,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { nticks++; watch1.Start(); + m_currentOutgoingClient = client; + try { if (client is LLClientView) @@ -1344,6 +1397,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Make sure this client is still alive if (m_scene.TryGetClient(udpClient.AgentID, out client)) { + m_currentIncomingClient = client; + try { // Process this packet @@ -1361,6 +1416,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_log.ErrorFormat("[LLUDPSERVER]: Client packet handler for {0} for packet {1} threw an exception", udpClient.AgentID, packet.Type); m_log.Error(e.Message, e); } + finally + { + m_currentIncomingClient = null; + } } else { -- cgit v1.1 From 7550b97e65fa873b42624648747cec3e12a8e689 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 7 Jun 2012 04:00:29 +0100 Subject: Log warning if we try to remove a UDP client that has already been removed. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index e37adb8..09bb52c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1114,6 +1114,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP client.IsLoggingOut = true; client.Close(); } + else + { + m_log.WarnFormat( + "[LLUDPSERVER]: Tried to remove client with id {0} but not such client in {1}", + udpClient.AgentID, m_scene.RegionInfo.RegionName); + } } private void IncomingPacketHandler() -- cgit v1.1 From d71c6dea7e5bfe827a9d723d972a9eec4cb77826 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 8 Jun 2012 01:43:58 +0100 Subject: Store already retrieve IClientAPI in IncomingPacket structure for later use rather than doing another retrieve on dequeue. Instead of checking whether the client still exists by trying to retrieve again from the client manager, this patch gets it back from IncomingPacket and checks the IClientAPI.IsActive state. --- .../ClientStack/Linden/UDP/IncomingPacket.cs | 5 +++-- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 26 +++++++++++----------- 2 files changed, 16 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs b/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs index 90b3ede..1b8535c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs @@ -39,7 +39,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP public sealed class IncomingPacket { /// Client this packet came from - public LLUDPClient Client; + public LLClientView Client; + /// Packet data that has been received public Packet Packet; @@ -48,7 +49,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// Reference to the client this packet came from /// Packet data - public IncomingPacket(LLUDPClient client, Packet packet) + public IncomingPacket(LLClientView client, Packet packet) { Client = client; Packet = packet; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 09bb52c..55bda63 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -879,7 +879,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion Ping Check Handling // Inbox insertion - packetInbox.Enqueue(new IncomingPacket(udpClient, packet)); + packetInbox.Enqueue(new IncomingPacket((LLClientView)client, packet)); } #region BinaryStats @@ -1386,22 +1386,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion - private void ProcessInPacket(object state) + private void ProcessInPacket(IncomingPacket incomingPacket) { - IncomingPacket incomingPacket = (IncomingPacket)state; Packet packet = incomingPacket.Packet; - LLUDPClient udpClient = incomingPacket.Client; - IClientAPI client; + LLClientView client = incomingPacket.Client; // Sanity check - if (packet == null || udpClient == null) + if (packet == null || client == null) { - m_log.WarnFormat("[LLUDPSERVER]: Processing a packet with incomplete state. Packet=\"{0}\", UDPClient=\"{1}\"", - packet, udpClient); + m_log.WarnFormat("[LLUDPSERVER]: Processing a packet with incomplete state. Packet=\"{0}\", Client=\"{1}\"", + packet, client); } - // Make sure this client is still alive - if (m_scene.TryGetClient(udpClient.AgentID, out client)) + if (client.IsActive) { m_currentIncomingClient = client; @@ -1419,8 +1416,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP catch (Exception e) { // Don't let a failure in an individual client thread crash the whole sim. - m_log.ErrorFormat("[LLUDPSERVER]: Client packet handler for {0} for packet {1} threw an exception", udpClient.AgentID, packet.Type); - m_log.Error(e.Message, e); + m_log.Error( + string.Format( + "[LLUDPSERVER]: Client packet handler for {0} for packet {1} threw ", + client.Name, packet.Type), + e); } finally { @@ -1431,7 +1431,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_log.DebugFormat( "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}", - packet.Type, udpClient.AgentID, m_scene.RegionInfo.RegionName); + packet.Type, client.Name, m_scene.RegionInfo.RegionName); } } -- cgit v1.1 From d73805d7f488e45a00a2d25c08876d400083d27f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 8 Jun 2012 01:51:28 +0100 Subject: Remove null checks at top of LLUDPServer.ProcessInPacket(). Neither packet nor client are ever null. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 55bda63..a292a6c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1391,13 +1391,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP Packet packet = incomingPacket.Packet; LLClientView client = incomingPacket.Client; - // Sanity check - if (packet == null || client == null) - { - m_log.WarnFormat("[LLUDPSERVER]: Processing a packet with incomplete state. Packet=\"{0}\", Client=\"{1}\"", - packet, client); - } - if (client.IsActive) { m_currentIncomingClient = client; @@ -1442,4 +1435,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP RemoveClient(((LLClientView)client).UDPClient); } } -} +} \ No newline at end of file -- cgit v1.1 From 5f4f9f02309b7df4d1bdcc560cee96d266c48a07 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 8 Jun 2012 03:12:23 +0100 Subject: Add regression test for client logout due to ack timeout. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 10 +- .../Linden/UDP/Tests/BasicCircuitTests.cs | 175 +++++++++++---------- .../Linden/UDP/Tests/TestLLUDPServer.cs | 9 ++ 3 files changed, 103 insertions(+), 91 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index a292a6c..58a3b1c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -147,11 +147,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP private int m_elapsed500MSOutgoingPacketHandler; /// Flag to signal when clients should check for resends - private bool m_resendUnacked; + protected bool m_resendUnacked; + /// Flag to signal when clients should send ACKs - private bool m_sendAcks; + protected bool m_sendAcks; + /// Flag to signal when clients should send pings - private bool m_sendPing; + protected bool m_sendPing; private int m_defaultRTO = 0; private int m_maxRTO = 0; @@ -1244,7 +1246,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Watchdog.RemoveThread(); } - private void ClientOutgoingPacketHandler(IClientAPI client) + protected void ClientOutgoingPacketHandler(IClientAPI client) { m_currentOutgoingClient = client; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs index 1321470..45d0e2a 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs @@ -45,6 +45,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests [TestFixture] public class BasicCircuitTests { + private Scene m_scene; + private TestLLUDPServer m_udpServer; + [TestFixtureSetUp] public void FixtureInit() { @@ -61,83 +64,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; } -// /// -// /// Add a client for testing -// /// -// /// -// /// -// /// -// /// Agent circuit manager used in setting up the stack -// protected void SetupStack( -// IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer, -// out AgentCircuitManager acm) -// { -// IConfigSource configSource = new IniConfigSource(); -// ClientStackUserSettings userSettings = new ClientStackUserSettings(); -// testLLUDPServer = new TestLLUDPServer(); -// acm = new AgentCircuitManager(); -// -// uint port = 666; -// testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm); -// testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings); -// testLLUDPServer.LocalScene = scene; -// } - -// /// -// /// Set up a client for tests which aren't concerned with this process itself and where only one client is being -// /// tested -// /// -// /// -// /// -// /// -// /// -// protected void AddClient( -// uint circuitCode, EndPoint epSender, TestLLUDPServer testLLUDPServer, AgentCircuitManager acm) -// { -// UUID myAgentUuid = UUID.Parse("00000000-0000-0000-0000-000000000001"); -// UUID mySessionUuid = UUID.Parse("00000000-0000-0000-0000-000000000002"); -// -// AddClient(circuitCode, epSender, myAgentUuid, mySessionUuid, testLLUDPServer, acm); -// } - -// /// -// /// Set up a client for tests which aren't concerned with this process itself -// /// -// /// -// /// -// /// -// /// -// /// -// /// -// protected void AddClient( -// uint circuitCode, EndPoint epSender, UUID agentId, UUID sessionId, -// TestLLUDPServer testLLUDPServer, AgentCircuitManager acm) -// { -// AgentCircuitData acd = new AgentCircuitData(); -// acd.AgentID = agentId; -// acd.SessionID = sessionId; -// -// UseCircuitCodePacket uccp = new UseCircuitCodePacket(); -// -// UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock -// = new UseCircuitCodePacket.CircuitCodeBlock(); -// uccpCcBlock.Code = circuitCode; -// uccpCcBlock.ID = agentId; -// uccpCcBlock.SessionID = sessionId; -// uccp.CircuitCode = uccpCcBlock; -// -// acm.AddNewCircuit(circuitCode, acd); -// -// testLLUDPServer.LoadReceive(uccp, epSender); -// testLLUDPServer.ReceiveData(null); -// } + [SetUp] + public void SetUp() + { + m_scene = new SceneHelpers().SetupScene(); + } /// /// Build an object name packet for test purposes /// /// /// - protected ObjectNamePacket BuildTestObjectNamePacket(uint objectLocalId, string objectName) + private ObjectNamePacket BuildTestObjectNamePacket(uint objectLocalId, string objectName) { ObjectNamePacket onp = new ObjectNamePacket(); ObjectNamePacket.ObjectDataBlock odb = new ObjectNamePacket.ObjectDataBlock(); @@ -148,6 +86,55 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests return onp; } + + private void AddUdpServer() + { + AddUdpServer(new IniConfigSource()); + } + + private void AddUdpServer(IniConfigSource configSource) + { + uint port = 0; + AgentCircuitManager acm = m_scene.AuthenticateHandler; + + m_udpServer = new TestLLUDPServer(IPAddress.Any, ref port, 0, false, configSource, acm); + m_udpServer.AddScene(m_scene); + } + + /// + /// Used by tests that aren't testing this stage. + /// + private ScenePresence AddClient() + { + UUID myAgentUuid = TestHelpers.ParseTail(0x1); + UUID mySessionUuid = TestHelpers.ParseTail(0x2); + uint myCircuitCode = 123456; + IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); + + UseCircuitCodePacket uccp = new UseCircuitCodePacket(); + + UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock + = new UseCircuitCodePacket.CircuitCodeBlock(); + uccpCcBlock.Code = myCircuitCode; + uccpCcBlock.ID = myAgentUuid; + uccpCcBlock.SessionID = mySessionUuid; + uccp.CircuitCode = uccpCcBlock; + + byte[] uccpBytes = uccp.ToBytes(); + UDPPacketBuffer upb = new UDPPacketBuffer(testEp, uccpBytes.Length); + upb.DataLength = uccpBytes.Length; // God knows why this isn't set by the constructor. + Buffer.BlockCopy(uccpBytes, 0, upb.Data, 0, uccpBytes.Length); + + AgentCircuitData acd = new AgentCircuitData(); + acd.AgentID = myAgentUuid; + acd.SessionID = mySessionUuid; + + m_scene.AuthenticateHandler.AddNewCircuit(myCircuitCode, acd); + + m_udpServer.PacketReceived(upb); + + return m_scene.GetScenePresence(myAgentUuid); + } /// /// Test adding a client to the stack @@ -158,19 +145,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests TestHelpers.InMethod(); // XmlConfigurator.Configure(); - TestScene scene = new SceneHelpers().SetupScene(); - uint myCircuitCode = 123456; + AddUdpServer(); + UUID myAgentUuid = TestHelpers.ParseTail(0x1); UUID mySessionUuid = TestHelpers.ParseTail(0x2); + uint myCircuitCode = 123456; IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); - uint port = 0; - AgentCircuitManager acm = scene.AuthenticateHandler; - - TestLLUDPServer llUdpServer - = new TestLLUDPServer(IPAddress.Any, ref port, 0, false, new IniConfigSource(), acm); - llUdpServer.AddScene(scene); - UseCircuitCodePacket uccp = new UseCircuitCodePacket(); UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock @@ -185,26 +166,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests upb.DataLength = uccpBytes.Length; // God knows why this isn't set by the constructor. Buffer.BlockCopy(uccpBytes, 0, upb.Data, 0, uccpBytes.Length); - llUdpServer.PacketReceived(upb); + m_udpServer.PacketReceived(upb); // Presence shouldn't exist since the circuit manager doesn't know about this circuit for authentication yet - Assert.That(scene.GetScenePresence(myAgentUuid), Is.Null); + Assert.That(m_scene.GetScenePresence(myAgentUuid), Is.Null); AgentCircuitData acd = new AgentCircuitData(); acd.AgentID = myAgentUuid; acd.SessionID = mySessionUuid; - acm.AddNewCircuit(myCircuitCode, acd); + m_scene.AuthenticateHandler.AddNewCircuit(myCircuitCode, acd); - llUdpServer.PacketReceived(upb); + m_udpServer.PacketReceived(upb); // Should succeed now - ScenePresence sp = scene.GetScenePresence(myAgentUuid); + ScenePresence sp = m_scene.GetScenePresence(myAgentUuid); Assert.That(sp.UUID, Is.EqualTo(myAgentUuid)); - Assert.That(llUdpServer.PacketsSent.Count, Is.EqualTo(1)); + Assert.That(m_udpServer.PacketsSent.Count, Is.EqualTo(1)); - Packet packet = llUdpServer.PacketsSent[0]; + Packet packet = m_udpServer.PacketsSent[0]; Assert.That(packet, Is.InstanceOf(typeof(PacketAckPacket))); PacketAckPacket ackPacket = packet as PacketAckPacket; @@ -212,6 +193,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests Assert.That(ackPacket.Packets[0].ID, Is.EqualTo(0)); } + [Test] + public void TestLogoutClientDueToAck() + { + TestHelpers.InMethod(); + TestHelpers.EnableLogging(); + + IniConfigSource ics = new IniConfigSource(); + IConfig config = ics.AddConfig("ClientStack.LindenUDP"); + config.Set("AckTimeout", -1); + AddUdpServer(ics); + + ScenePresence sp = AddClient(); + m_udpServer.ClientOutgoingPacketHandler(sp.ControllingClient, true, false, false); + + ScenePresence spAfterAckTimeout = m_scene.GetScenePresence(sp.UUID); + Assert.That(spAfterAckTimeout, Is.Null); + + TestHelpers.DisableLogging(); + } + // /// // /// Test removing a client from the stack // /// diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs index 0302385..27b9e5b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs @@ -59,6 +59,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests PacketsSent.Add(packet); } + public void ClientOutgoingPacketHandler(IClientAPI client, bool resendUnacked, bool sendAcks, bool sendPing) + { + m_resendUnacked = resendUnacked; + m_sendAcks = sendAcks; + m_sendPing = sendPing; + + ClientOutgoingPacketHandler(client); + } + //// /// //// /// The chunks of data to pass to the LLUDPServer when it calls EndReceive //// /// -- cgit v1.1 From c215b1ad169cb8c3add70622f610e980ee9cfa31 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 8 Jun 2012 03:53:03 +0100 Subject: If logging a client out due to ack timeout, do this asynchronously rather than synchronously on the outgoing packet loop. This is the same async behaviour as normal logouts. This is necessary because the event queue will sleep the thread for 5 seconds on an ack timeout logout as the client isn't around to pick up the final event queue messages. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 26 +++++++++++++++------- .../Linden/UDP/Tests/BasicCircuitTests.cs | 4 ++-- 2 files changed, 20 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 58a3b1c..e1fccb5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -539,8 +539,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP SendPacket(udpClient, completePing, ThrottleOutPacketType.Unknown, false, null); } - public void HandleUnacked(LLUDPClient udpClient) + public void HandleUnacked(LLClientView client) { + LLUDPClient udpClient = client.UDPClient; + if (!udpClient.IsConnected) return; @@ -553,12 +555,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (udpClient.IsPaused) timeoutTicks = m_pausedAckTimeout; - if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks) + if (!client.IsLoggingOut && + (Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks) { m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); - RemoveClient(udpClient); + return; } @@ -1113,8 +1116,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP IClientAPI client; if (m_scene.TryGetClient(udpClient.AgentID, out client)) { + // We must set IsLoggingOut synchronously so that we can stop the packet loop reinvoking this method. client.IsLoggingOut = true; - client.Close(); + + // Fire this out on a different thread so that we don't hold up outgoing packet processing for + // everybody else if this is being called due to an ack timeout. + // This is the same as processing as the async process of a logout request. + Util.FireAndForget(o => client.Close()); } else { @@ -1254,12 +1262,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP { if (client is LLClientView) { - LLUDPClient udpClient = ((LLClientView)client).UDPClient; + LLClientView llClient = (LLClientView)client; + LLUDPClient udpClient = llClient.UDPClient; if (udpClient.IsConnected) { if (m_resendUnacked) - HandleUnacked(udpClient); + HandleUnacked(llClient); if (m_sendAcks) SendAcks(udpClient); @@ -1308,7 +1317,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { if (client is LLClientView) { - LLUDPClient udpClient = ((LLClientView)client).UDPClient; + LLClientView llClient = (LLClientView)client; + LLUDPClient udpClient = llClient.UDPClient; if (udpClient.IsConnected) { @@ -1317,7 +1327,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP nticksUnack++; watch2.Start(); - HandleUnacked(udpClient); + HandleUnacked(llClient); watch2.Stop(); avgResendUnackedTicks = (nticksUnack - 1)/(float)nticksUnack * avgResendUnackedTicks + (watch2.ElapsedTicks / (float)nticksUnack); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs index 45d0e2a..109a8e1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs @@ -197,7 +197,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests public void TestLogoutClientDueToAck() { TestHelpers.InMethod(); - TestHelpers.EnableLogging(); +// TestHelpers.EnableLogging(); IniConfigSource ics = new IniConfigSource(); IConfig config = ics.AddConfig("ClientStack.LindenUDP"); @@ -210,7 +210,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests ScenePresence spAfterAckTimeout = m_scene.GetScenePresence(sp.UUID); Assert.That(spAfterAckTimeout, Is.Null); - TestHelpers.DisableLogging(); +// TestHelpers.DisableLogging(); } // /// -- cgit v1.1 From f94b92df4646162c0a8f37dd3373c6c2a20c66e3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 8 Jun 2012 04:12:22 +0100 Subject: Instead of retrieving the known client again in LLUDPServer.RemoveClient(), check the IsLoggingOut flag instead. This is slightly better thread-race wise --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 31 +++++++--------------- 1 file changed, 10 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index e1fccb5..7f86491 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -560,7 +560,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); - RemoveClient(udpClient); + RemoveClient(client); return; } @@ -1110,26 +1110,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP return client; } - private void RemoveClient(LLUDPClient udpClient) + private void RemoveClient(IClientAPI client) { - // Remove this client from the scene - IClientAPI client; - if (m_scene.TryGetClient(udpClient.AgentID, out client)) - { - // We must set IsLoggingOut synchronously so that we can stop the packet loop reinvoking this method. - client.IsLoggingOut = true; + // We must set IsLoggingOut synchronously so that we can stop the packet loop reinvoking this method. + client.IsLoggingOut = true; - // Fire this out on a different thread so that we don't hold up outgoing packet processing for - // everybody else if this is being called due to an ack timeout. - // This is the same as processing as the async process of a logout request. - Util.FireAndForget(o => client.Close()); - } - else - { - m_log.WarnFormat( - "[LLUDPSERVER]: Tried to remove client with id {0} but not such client in {1}", - udpClient.AgentID, m_scene.RegionInfo.RegionName); - } + // Fire this out on a different thread so that we don't hold up outgoing packet processing for + // everybody else if this is being called due to an ack timeout. + // This is the same as processing as the async process of a logout request. + Util.FireAndForget(o => client.Close()); } private void IncomingPacketHandler() @@ -1443,8 +1432,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected void LogoutHandler(IClientAPI client) { client.SendLogoutPacket(); - if (client.IsActive) - RemoveClient(((LLClientView)client).UDPClient); + if (!client.IsLoggingOut) + RemoveClient(client); } } } \ No newline at end of file -- cgit v1.1 From 794d184c253d1967535e4040682a70b729dc3ccb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 8 Jun 2012 04:32:51 +0100 Subject: Stop sending a DisableSimulator packet in LLClientView.Close(), which is a duplicate for child agents and unnecessary for root agents. Close() already calls Scene.RemoveClient() which sends the right eq or udp DisableSimulator message to child agents. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4d6081c..74b9c6d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -494,10 +494,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP "[CLIENT]: Close has been called for {0} attached to scene {1}", Name, m_scene.RegionInfo.RegionName); - // Send the STOP packet - DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); - OutPacket(disable, ThrottleOutPacketType.Unknown); - IsActive = false; // Shutdown the image manager -- cgit v1.1 From 8c7149063bce41cac6543757c7b917583f21ea90 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 12 Jun 2012 01:23:40 +0100 Subject: In PresenceDetector.OnConnectionClose(), use the IsChildAgent check already available on IClientAPI.SceneAgent rather than retrieving it again by scanning all scenes. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 74b9c6d..c4f167e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -490,12 +490,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public void Close() { + IsActive = false; + m_log.DebugFormat( "[CLIENT]: Close has been called for {0} attached to scene {1}", Name, m_scene.RegionInfo.RegionName); - IsActive = false; - // Shutdown the image manager ImageManager.Close(); -- cgit v1.1 From c89db34fc4372be7ff94d92472131b2c33de8605 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 12 Jun 2012 02:03:31 +0100 Subject: If the simulator closes a root agent due to ack timeout, then send the client a kick message with that reason, in case it is somehow still listening. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 7f86491..2036f61 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -558,9 +558,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (!client.IsLoggingOut && (Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks) { - m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); + m_log.WarnFormat( + "[LLUDPSERVER]: Ack timeout for {0} {1}, disconnecting", + client.Name, client.AgentId); + StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); - RemoveClient(client); + LogoutClientDueToTimeout(client); return; } @@ -1121,6 +1124,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP Util.FireAndForget(o => client.Close()); } + private void LogoutClientDueToTimeout(IClientAPI client) + { + // We must set IsLoggingOut synchronously so that we can stop the packet loop reinvoking this method. + client.IsLoggingOut = true; + + // Fire this out on a different thread so that we don't hold up outgoing packet processing for + // everybody else if this is being called due to an ack timeout. + // This is the same as processing as the async process of a logout request. + Util.FireAndForget( + o => + { if (!client.SceneAgent.IsChildAgent) + client.Kick("Simulator logged you out due to connection timeout"); + client.Close(); }); + } + private void IncomingPacketHandler() { // Set this culture for the thread that incoming packets are received -- cgit v1.1 From b099f26376a7d671eeb9113dd7611cfcb0e57de0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 12 Jun 2012 02:16:36 +0100 Subject: Set IClientAPI.IsActive = false early on client removal due to ack timeout rather than using IsLoggingOut flag. IsActive is more appropriate since unack timeout is not due to voluntary logout. This is in line with operations such as manual kick that do not set the IsLoggingOut flag. It's also slightly better race-wise since it reduces the chance of this operation clashing with another reason for client deactivation (e.g. manual kick). --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 64 ++++++++++++---------- 1 file changed, 35 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 2036f61..37d2943 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -555,15 +555,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (udpClient.IsPaused) timeoutTicks = m_pausedAckTimeout; - if (!client.IsLoggingOut && + if (client.IsActive && (Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks) { - m_log.WarnFormat( - "[LLUDPSERVER]: Ack timeout for {0} {1}, disconnecting", - client.Name, client.AgentId); + // We must set IsActive synchronously so that we can stop the packet loop reinvoking this method, even + // though it's set later on by LLClientView.Close() + client.IsActive = false; - StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); - LogoutClientDueToTimeout(client); + // Fire this out on a different thread so that we don't hold up outgoing packet processing for + // everybody else if this is being called due to an ack timeout. + // This is the same as processing as the async process of a logout request. + Util.FireAndForget(o => DeactivateClientDueToTimeout(client)); return; } @@ -792,7 +794,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Interlocked.Increment(ref udpClient.PacketsReceived); int now = Environment.TickCount & Int32.MaxValue; - udpClient.TickLastPacketReceived = now; +// udpClient.TickLastPacketReceived = now; #region ACK Receiving @@ -1113,30 +1115,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP return client; } - private void RemoveClient(IClientAPI client) + /// + /// Deactivates the client if we don't receive any packets within a certain amount of time (default 60 seconds). + /// + /// + /// If a connection is active then we will always receive packets even if nothing else is happening, due to + /// regular client pings. + /// + /// + private void DeactivateClientDueToTimeout(IClientAPI client) { - // We must set IsLoggingOut synchronously so that we can stop the packet loop reinvoking this method. - client.IsLoggingOut = true; + // We must set IsActive synchronously so that we can stop the packet loop reinvoking this method, even + // though it's set later on by LLClientView.Close() + client.IsActive = false; - // Fire this out on a different thread so that we don't hold up outgoing packet processing for - // everybody else if this is being called due to an ack timeout. - // This is the same as processing as the async process of a logout request. - Util.FireAndForget(o => client.Close()); - } + m_log.WarnFormat( + "[LLUDPSERVER]: Ack timeout, disconnecting {0} agent for {1} in {2}", + client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, m_scene.RegionInfo.RegionName); - private void LogoutClientDueToTimeout(IClientAPI client) - { - // We must set IsLoggingOut synchronously so that we can stop the packet loop reinvoking this method. - client.IsLoggingOut = true; - - // Fire this out on a different thread so that we don't hold up outgoing packet processing for - // everybody else if this is being called due to an ack timeout. - // This is the same as processing as the async process of a logout request. - Util.FireAndForget( - o => - { if (!client.SceneAgent.IsChildAgent) - client.Kick("Simulator logged you out due to connection timeout"); - client.Close(); }); + StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); + + if (!client.SceneAgent.IsChildAgent) + client.Kick("Simulator logged you out due to connection timeout"); + + client.Close(); } private void IncomingPacketHandler() @@ -1450,8 +1452,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected void LogoutHandler(IClientAPI client) { client.SendLogoutPacket(); + if (!client.IsLoggingOut) - RemoveClient(client); + { + client.IsLoggingOut = true; + client.Close(); + } } } } \ No newline at end of file -- cgit v1.1 From 2ca31a9841991f748e972c96a3eba96e611f1dea Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 12 Jun 2012 02:46:14 +0100 Subject: Remove accidental timeout left in during earlier debugging. Has been in since two commits ago (b099f26) --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 37d2943..5126d84 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -794,7 +794,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Interlocked.Increment(ref udpClient.PacketsReceived); int now = Environment.TickCount & Int32.MaxValue; -// udpClient.TickLastPacketReceived = now; + udpClient.TickLastPacketReceived = now; #region ACK Receiving -- cgit v1.1 From f726150afdf3fd85f3ec08585fd84f75b5852e79 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 13 Jun 2012 23:39:23 +0100 Subject: Add ObjectUpdate as one of the packets that can be screened out when setting debug packet level --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index c4f167e..ad39b50 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -11650,7 +11650,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) logPacket = false; - if (DebugPacketLevel <= 50 && packet.Type == PacketType.ImprovedTerseObjectUpdate) + if (DebugPacketLevel <= 50 + & (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate)) logPacket = false; if (DebugPacketLevel <= 25 && packet.Type == PacketType.ObjectPropertiesFamily) -- cgit v1.1 From cf080a68d657e082dd61dacc24ffd17240154e90 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 13 Jun 2012 23:42:22 +0100 Subject: Remove long obsolete and unused IClientAPI.KillEndDone() --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index ad39b50..4e0dadb 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -11861,10 +11861,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP return string.Empty; } - public void KillEndDone() - { - } - #region IClientCore private readonly Dictionary m_clientInterfaces = new Dictionary(); -- cgit v1.1 From 16ffc764bf57dcc85461f2e5c6457ee8237e78c9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 13 Jun 2012 23:54:32 +0100 Subject: minor: refactor part of LLClientView.ProcessEntityUpdates() to remove duplicate code --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4e0dadb..85d83f8 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3780,16 +3780,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (!canUseImproved && !canUseCompressed) { + ObjectUpdatePacket.ObjectDataBlock updateBlock; + if (update.Entity is ScenePresence) { - objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity)); - objectUpdates.Value.Add(update); + updateBlock = CreateAvatarUpdateBlock((ScenePresence)update.Entity); } else { - objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); - objectUpdates.Value.Add(update); + updateBlock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, AgentId); } + + objectUpdateBlocks.Value.Add(updateBlock); + objectUpdates.Value.Add(update); } else if (!canUseImproved) { @@ -3814,7 +3817,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion Block Construction } - #region Packet Sending ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f); -- cgit v1.1 From cba8b4f8b8c2566426216e395561cdf4ae49c72e Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 6 Jun 2012 20:35:00 +0200 Subject: Fix not sending TransferInfo when an asset is not found. This clogs up the sound pipeline in the viewer. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 33 +++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 85d83f8..8f55208 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -2719,6 +2719,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + public void SendAssetNotFound(AssetRequestToClient req) + { + TransferInfoPacket Transfer = new TransferInfoPacket(); + Transfer.TransferInfo.ChannelType = 2; + Transfer.TransferInfo.Status = -2; + Transfer.TransferInfo.TargetType = 0; + Transfer.TransferInfo.Params = req.Params; + Transfer.TransferInfo.Size = 0; + Transfer.TransferInfo.TransferID = req.TransferRequestID; + Transfer.Header.Zerocoded = true; + OutPacket(Transfer, ThrottleOutPacketType.Asset); + } + public void SendTexture(AssetBase TextureAsset) { @@ -11980,14 +11993,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// protected void AssetReceived(string id, Object sender, AssetBase asset) { - if (asset == null) - return; - TransferRequestPacket transferRequest = (TransferRequestPacket)sender; UUID requestID = UUID.Zero; byte source = (byte)SourceType.Asset; + AssetRequestToClient req = new AssetRequestToClient(); + + if (asset == null) + { + req.AssetInf = null; + req.AssetRequestSource = source; + req.IsTextureRequest = false; + req.NumPackets = 0; + req.Params = transferRequest.TransferInfo.Params; + req.RequestAssetID = requestID; + req.TransferRequestID = transferRequest.TransferInfo.TransferID; + + SendAssetNotFound(req); + return; + } + if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) { requestID = new UUID(transferRequest.TransferInfo.Params, 0); @@ -12004,7 +12030,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP return; // The asset is known to exist and is in our cache, so add it to the AssetRequests list - AssetRequestToClient req = new AssetRequestToClient(); req.AssetInf = asset; req.AssetRequestSource = source; req.IsTextureRequest = false; -- cgit v1.1 From 917d753f1c1474b4ed3f905d8dd95db2e0e2fc9e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 14 Jun 2012 01:36:37 +0100 Subject: Fix a race condition where an object update for a hud could be sent to non-owner avatars if the hud was attached directly from within the region. If this happens, then the non-owners would see unremovable huds that they did not own until relog, and sometimes even beyond that. This was due to a race between the entity update and the attachment code when moving an object from within scene to a hud. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 85d83f8..83e49f3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3722,8 +3722,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - ++updatesThisCall; - #region UpdateFlags to packet type conversion PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; @@ -3788,7 +3786,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - updateBlock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, AgentId); + SceneObjectPart part = (SceneObjectPart)update.Entity; + updateBlock = CreatePrimUpdateBlock(part, AgentId); + + // If the part has become a private hud since the update was scheduled then we do not + // want to send it to other avatars. + if (part.ParentGroup.IsAttachment + && part.ParentGroup.HasPrivateAttachmentPoint + && part.ParentGroup.AttachedAvatar != AgentId) + continue; } objectUpdateBlocks.Value.Add(updateBlock); @@ -3811,6 +3817,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // Everything else goes here terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); + + if (update.Entity is SceneObjectPart) + { + SceneObjectPart part = (SceneObjectPart)update.Entity; + + // If the part has become a private hud since the update was scheduled then we do not + // want to send it to other avatars. + if (part.ParentGroup.IsAttachment + && part.ParentGroup.HasPrivateAttachmentPoint + && part.ParentGroup.AttachedAvatar != AgentId) + continue; + } + terseUpdates.Value.Add(update); } } @@ -3880,6 +3899,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP // If any of the packets created from this call go unacknowledged, all of the updates will be resent OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); } + + ++updatesThisCall; } #endregion Packet Sending -- cgit v1.1 From 3888b9a670656cbcdcb5e6cd46365927a1888f27 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 14 Jun 2012 03:32:44 +0100 Subject: If we're going to discard a terse update block because it's now someone else's hud, then don't still add it to the list of blocks for the update message. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 9f32c33..4ea977e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3828,9 +3828,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - // Everything else goes here - terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); + ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseUpdateBlock + = CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)); + // Everything else goes here if (update.Entity is SceneObjectPart) { SceneObjectPart part = (SceneObjectPart)update.Entity; @@ -3843,6 +3844,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP continue; } + terseUpdateBlocks.Value.Add(terseUpdateBlock); terseUpdates.Value.Add(update); } } -- cgit v1.1 From 2c6555021fdcf5dcd08a19d41412acf20f514b14 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 14 Jun 2012 03:49:54 +0100 Subject: Fix very recent regression in 917d753 where I put the ++updatesThisCall outside the batching part of ProcessEntityUpdates() This stopped any batching happening and since this method is called periodically updates were sent very slowly --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4ea977e..4cb7a3a 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3848,6 +3848,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP terseUpdates.Value.Add(update); } } + + ++updatesThisCall; #endregion Block Construction } @@ -3914,8 +3916,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP // If any of the packets created from this call go unacknowledged, all of the updates will be resent OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); } - - ++updatesThisCall; } #endregion Packet Sending -- cgit v1.1 From aaa30dcebc223d74d59ecb5d9f8e1e69532efb7c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Jun 2012 05:01:36 +0100 Subject: Add region name to UseCircuitCode log messages --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 5126d84..44c65e0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -986,8 +986,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; m_log.DebugFormat( - "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} from {1}", - uccp.CircuitCode.Code, buffer.RemoteEndPoint); + "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} to {1} from IP {2}", + uccp.CircuitCode.Code, m_scene.RegionInfo.RegionName, buffer.RemoteEndPoint); remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; @@ -1016,8 +1016,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // Don't create clients for unauthorized requesters. m_log.WarnFormat( - "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}", - uccp.CircuitCode.ID, uccp.CircuitCode.Code, remoteEndPoint); + "[LLUDPSERVER]: Ignoring connection request for {0} to {1} with unknown circuit code {2} from IP {3}", + uccp.CircuitCode.ID, m_scene.RegionInfo.RegionName, uccp.CircuitCode.Code, remoteEndPoint); } // m_log.DebugFormat( -- cgit v1.1 From 5301648cff6b451fef4cca0baf8cda1bdb1455a6 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 25 Jun 2012 21:08:19 +0100 Subject: In AttachmentsModule.DetachSingleAttachmentToInvInternal(), remove attachment before changing properties for correct inventory serialization. Serialization of attachments requires IsAttachment = false so that correct positions are serialized instead of avatar position. However, doing this when a hud is still attached allows race conditions with update threads, resulting in hud artifacts on other viewers. This change sets SOG.IsDeleted before serialization changes take place (IsDeleted itself is not a serialized property). LLClientView then screens out any deleted SOGs before sending updates to viewers. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 33 +++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4cb7a3a..8874585 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3808,6 +3808,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP && part.ParentGroup.HasPrivateAttachmentPoint && part.ParentGroup.AttachedAvatar != AgentId) continue; + + // If the part has since been deleted, then drop the update. In the case of attachments, + // this is to avoid spurious updates to other viewers since post-processing of attachments + // has to change the IsAttachment flag for various reasons (which will end up in a pass + // of the test above). + // + // Actual deletions (kills) happen in another method. + if (part.ParentGroup.IsDeleted) + continue; } objectUpdateBlocks.Value.Add(updateBlock); @@ -3815,7 +3824,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else if (!canUseImproved) { - compressedUpdateBlocks.Value.Add(CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags)); + SceneObjectPart part = (SceneObjectPart)update.Entity; + ObjectUpdateCompressedPacket.ObjectDataBlock compressedBlock + = CreateCompressedUpdateBlock(part, updateFlags); + + // If the part has since been deleted, then drop the update. In the case of attachments, + // this is to avoid spurious updates to other viewers since post-processing of attachments + // has to change the IsAttachment flag for various reasons (which will end up in a pass + // of the test above). + // + // Actual deletions (kills) happen in another method. + if (part.ParentGroup.IsDeleted) + continue; + + compressedUpdateBlocks.Value.Add(compressedBlock); compressedUpdates.Value.Add(update); } else @@ -3842,6 +3864,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP && part.ParentGroup.HasPrivateAttachmentPoint && part.ParentGroup.AttachedAvatar != AgentId) continue; + + // If the part has since been deleted, then drop the update. In the case of attachments, + // this is to avoid spurious updates to other viewers since post-processing of attachments + // has to change the IsAttachment flag for various reasons (which will end up in a pass + // of the test above). + // + // Actual deletions (kills) happen in another method. + if (part.ParentGroup.IsDeleted) + continue; } terseUpdateBlocks.Value.Add(terseUpdateBlock); -- cgit v1.1 From f202c36106815949e56c58612770a00c65ab80a3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Jun 2012 00:03:22 +0100 Subject: Add IScene.Name for code clarity to replace the RegionInfo.RegionName used in many, many log messages. --- OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs index d76927b..119a677 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs @@ -44,9 +44,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests } protected int m_objectNameCallsReceived; - public MockScene() + public MockScene() : base(new RegionInfo(1000, 1000, null, null)) { - m_regInfo = new RegionInfo(1000, 1000, null, null); m_regStatus = RegionStatus.Up; } -- cgit v1.1 From 5691a8b860b22939e2b608d6d8400b5260b25cf3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 4 Jul 2012 00:15:03 +0100 Subject: refactor: rename Watchdog.WATCHDOG_TIMEOUT_MS to DEFAULT_WATCHDOG_TIMEOUT_MS to reflect what it actually is --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 44c65e0..468d524 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -270,7 +270,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP false, true, GetWatchdogIncomingAlarmData, - Watchdog.WATCHDOG_TIMEOUT_MS); + Watchdog.DEFAULT_WATCHDOG_TIMEOUT_MS); Watchdog.StartThread( OutgoingPacketHandler, @@ -279,7 +279,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP false, true, GetWatchdogOutgoingAlarmData, - Watchdog.WATCHDOG_TIMEOUT_MS); + Watchdog.DEFAULT_WATCHDOG_TIMEOUT_MS); m_elapsedMSSinceLastStatReport = Environment.TickCount; } -- cgit v1.1 From 3b3d9967b18335c28ce2dfc269e47bac0ede075a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 12 Jul 2012 23:29:57 +0100 Subject: Remove IClientAPI.GetClientEP() in favour of existing identical IClientAPI.RemoteEndpoint. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 8874585..0457fe6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -11845,11 +11845,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_udpClient.SetClientInfo(info); } - public EndPoint GetClientEP() - { - return m_userEndPoint; - } - #region Media Parcel Members public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) -- cgit v1.1 From dda999a22c5f36d1d413f2f5f29ce8782af85b0b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 12 Jul 2012 23:43:02 +0100 Subject: Remove IClientIPEndpoint client interface for now. This may well come back in the future when this subinterface is actually used but it currently isn't and I feel the name was poor. Everything uses IClientAPI.RemoveEndPoint which also returned the full endpoint rather than just the ip address. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 0457fe6..bc5315b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -59,7 +59,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// Handles new client connections /// Constructor takes a single Packet and authenticates everything /// - public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientInventory, IClientIPEndpoint, IStatsCollector + public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientInventory, IStatsCollector { /// /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. @@ -450,7 +450,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP RegisterInterface(this); RegisterInterface(this); RegisterInterface(this); - RegisterInterface(this); m_scene = scene; m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); @@ -12114,24 +12113,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP return numPackets; } - #region IClientIPEndpoint Members - - public IPAddress EndPoint - { - get - { - if (m_userEndPoint is IPEndPoint) - { - IPEndPoint ep = (IPEndPoint)m_userEndPoint; - - return ep.Address; - } - return null; - } - } - - #endregion - public void SendRebakeAvatarTextures(UUID textureID) { RebakeAvatarTexturesPacket pack = -- cgit v1.1 From d6f54b25cd8e3d7a465e9875d2e00dd414a1b019 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 12 Jul 2012 23:48:42 +0100 Subject: Stop redundantly passing in the endpoint to the LLClientView constructor. This can always be retrieved via the LLUDPClient and is so done in various places already. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 5 +---- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index bc5315b..73cdec3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -357,7 +357,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected string m_lastName; protected Thread m_clientThread; protected Vector3 m_startpos; - protected EndPoint m_userEndPoint; protected UUID m_activeGroupID; protected string m_activeGroupName = String.Empty; protected ulong m_activeGroupPowers; @@ -442,7 +441,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// Constructor /// - public LLClientView(EndPoint remoteEP, Scene scene, LLUDPServer udpServer, LLUDPClient udpClient, AuthenticateResponse sessionInfo, + public LLClientView(Scene scene, LLUDPServer udpServer, LLUDPClient udpClient, AuthenticateResponse sessionInfo, UUID agentId, UUID sessionId, uint circuitCode) { // DebugPacketLevel = 1; @@ -466,7 +465,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_sessionId = sessionId; m_secureSessionId = sessionInfo.LoginInfo.SecureSession; m_circuitCode = circuitCode; - m_userEndPoint = remoteEP; m_firstName = sessionInfo.LoginInfo.First; m_lastName = sessionInfo.LoginInfo.Last; m_startpos = sessionInfo.LoginInfo.StartPos; @@ -11832,7 +11830,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP { ClientInfo info = m_udpClient.GetClientInfo(); - info.userEP = m_userEndPoint; info.proxyEP = null; info.agentcircuit = RequestClientInfo(); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 468d524..097f109 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1103,7 +1103,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); - client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); + client = new LLClientView(m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); client.OnLogout += LogoutHandler; ((LLClientView)client).DisableFacelights = m_disableFacelights; -- cgit v1.1