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') 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 f49912f92abfae79ba00da74fc7665548266f7cd Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 26 Apr 2012 16:10:24 +0100 Subject: minor: Add more detail to unauthorized caps client message --- OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 8ec2f20..e20c24f 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -235,7 +235,10 @@ namespace OpenSim.Region.ClientStack.Linden if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint)) { - m_log.DebugFormat("[CAPS]: Unauthorized CAPS client"); + m_log.DebugFormat( + "[CAPS]: Unauthorized CAPS client {0} from {1}", + m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint); + return string.Empty; } -- 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') 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. --- .../Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs | 2 +- OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs | 2 +- OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs index a5209b7..c25b58c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs @@ -60,7 +60,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests CapabilitiesModule capsModule = new CapabilitiesModule(); EventQueueGetModule eqgModule = new EventQueueGetModule(); - m_scene = SceneHelpers.SetupScene(); + m_scene = new SceneHelpers().SetupScene(); SceneHelpers.SetupSceneModules(m_scene, config, capsModule, eqgModule); } 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') 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') 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 ++- OpenSim/Region/ClientStack/RegionApplicationBase.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack') 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); diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 6e3a58e..6e78d6d 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -111,7 +111,7 @@ namespace OpenSim.Region.ClientStack server.Start(); } } - + base.StartupSpecific(); } -- cgit v1.1 From 231a3bf147315a9284140476d2b09e13c3fee1c0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 3 May 2012 01:45:49 +0100 Subject: Implement optional name and description on http stream handlers so that we can relate a slow request to what the handler actually does and the agent it serves, if applicable. This is most useful for capabilities where the url is not self-describing. --- .../Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 47 ++++++++--- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 8 +- .../Linden/Caps/FetchInventory2Module.cs | 3 +- .../ClientStack/Linden/Caps/GetMeshModule.cs | 12 +-- .../ClientStack/Linden/Caps/GetTextureModule.cs | 4 +- .../Linden/Caps/MeshUploadFlagModule.cs | 4 +- .../NewFileAgentInventoryVariablePriceModule.cs | 93 ++++++++++++---------- .../Linden/Caps/ObjectCaps/ObjectAdd.cs | 14 ++-- .../Caps/ObjectCaps/UploadObjectAssetModule.cs | 15 ++-- .../Linden/Caps/SimulatorFeaturesModule.cs | 4 +- .../Linden/Caps/UploadBakedTextureModule.cs | 4 +- .../Linden/Caps/WebFetchInvDescModule.cs | 9 ++- 12 files changed, 137 insertions(+), 80 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index e20c24f..9791885 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -155,7 +155,9 @@ namespace OpenSim.Region.ClientStack.Linden try { // the root of all evil - m_HostCapsObj.RegisterHandler("SEED", new RestStreamHandler("POST", capsBase + m_requestPath, SeedCapRequest)); + m_HostCapsObj.RegisterHandler( + "SEED", new RestStreamHandler("POST", capsBase + m_requestPath, SeedCapRequest, "SEED", null)); + m_log.DebugFormat( "[CAPS]: Registered seed capability {0} for {1}", capsBase + m_requestPath, m_HostCapsObj.AgentID); @@ -163,7 +165,10 @@ namespace OpenSim.Region.ClientStack.Linden // new LLSDStreamhandler("POST", // capsBase + m_mapLayerPath, // GetMapLayer); - IRequestHandler req = new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory); + IRequestHandler req + = new RestStreamHandler( + "POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null); + m_HostCapsObj.RegisterHandler("UpdateScriptTaskInventory", req); m_HostCapsObj.RegisterHandler("UpdateScriptTask", req); } @@ -178,14 +183,27 @@ namespace OpenSim.Region.ClientStack.Linden try { // I don't think this one works... - m_HostCapsObj.RegisterHandler("NewFileAgentInventory", new LLSDStreamhandler("POST", - capsBase + m_newInventory, - NewAgentInventoryRequest)); - IRequestHandler req = new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory); + m_HostCapsObj.RegisterHandler( + "NewFileAgentInventory", + new LLSDStreamhandler( + "POST", + capsBase + m_newInventory, + NewAgentInventoryRequest, + "NewFileAgentInventory", + null)); + + IRequestHandler req + = new RestStreamHandler( + "POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory, "Update*", null); + m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); - m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard)); + + m_HostCapsObj.RegisterHandler( + "CopyInventoryFromNotecard", + new RestStreamHandler( + "POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null)); // As of RC 1.22.9 of the Linden client this is // supported @@ -289,7 +307,9 @@ namespace OpenSim.Region.ClientStack.Linden m_dumpAssetsToFile); uploader.OnUpLoad += TaskScriptUpdated; - m_HostCapsObj.HttpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); + m_HostCapsObj.HttpListener.AddStreamHandler( + new BinaryStreamHandler( + "POST", capsBase + uploaderPath, uploader.uploaderCaps, "BunchOfCaps", null)); string protocol = "http://"; @@ -416,8 +436,14 @@ namespace OpenSim.Region.ClientStack.Linden AssetUploader uploader = new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, llsdRequest.asset_type, capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_dumpAssetsToFile); + m_HostCapsObj.HttpListener.AddStreamHandler( - new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); + new BinaryStreamHandler( + "POST", + capsBase + uploaderPath, + uploader.uploaderCaps, + "NewAgentInventoryRequest", + m_HostCapsObj.AgentID.ToString())); string protocol = "http://"; @@ -733,7 +759,8 @@ namespace OpenSim.Region.ClientStack.Linden uploader.OnUpLoad += ItemUpdated; m_HostCapsObj.HttpListener.AddStreamHandler( - new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); + new BinaryStreamHandler( + "POST", capsBase + uploaderPath, uploader.uploaderCaps, "NoteCardAgentInventory", null)); string protocol = "http://"; diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 7c07c56..1a35d22 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -351,14 +351,18 @@ namespace OpenSim.Region.ClientStack.Linden // EventQueueGet when it receive capability information, but then we replace the rest handler immediately // afterwards with the poll service. So for now, we'll pass a null instead to simplify code reading, but // really it should be possible to directly register the poll handler as a capability. - caps.RegisterHandler("EventQueueGet", - new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", null)); + caps.RegisterHandler( + "EventQueueGet", + new RestHTTPHandler( + "POST", capsBase + EventQueueGetUUID.ToString() + "/", null)); + // delegate(Hashtable m_dhttpMethod) // { // return ProcessQueue(m_dhttpMethod, agentID, caps); // })); // This will persist this beyond the expiry of the caps handlers + // TODO: Add EventQueueGet name/description for diagnostics MainServer.Instance.AddPollServiceHTTPHandler( capsBase + EventQueueGetUUID.ToString() + "/", new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs index 14501c7..cb5afcc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs @@ -132,7 +132,8 @@ namespace OpenSim.Region.ClientStack.Linden capUrl = "/CAPS/" + UUID.Random(); IRequestHandler reqHandler - = new RestStreamHandler("POST", capUrl, m_fetchHandler.FetchInventoryRequest); + = new RestStreamHandler( + "POST", capUrl, m_fetchHandler.FetchInventoryRequest, capName, agentID.ToString()); caps.RegisterHandler(capName, reqHandler); } diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index e7bd2e7..0d7b1fc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs @@ -120,11 +120,13 @@ namespace OpenSim.Region.ClientStack.Linden { // m_log.DebugFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService); - IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), - delegate(Hashtable m_dhttpMethod) - { - return gmeshHandler.ProcessGetMesh(m_dhttpMethod, UUID.Zero, null); - }); + IRequestHandler reqHandler + = new RestHTTPHandler( + "GET", + "/CAPS/" + UUID.Random(), + httpMethod => gmeshHandler.ProcessGetMesh(httpMethod, UUID.Zero, null), + "GetMesh", + agentID.ToString()); caps.RegisterHandler("GetMesh", reqHandler); } diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index fffcee2..5ae9cc3 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs @@ -130,7 +130,9 @@ namespace OpenSim.Region.ClientStack.Linden if (m_URL == "localhost") { // m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); - caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService)); + caps.RegisterHandler( + "GetTexture", + new GetTextureHandler("/CAPS/" + capID + "/", m_assetService, "GetTexture", agentID.ToString())); } else { diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs index 18c7eae..44a6883 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs @@ -117,7 +117,9 @@ namespace OpenSim.Region.ClientStack.Linden public void RegisterCaps(UUID agentID, Caps caps) { - IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), MeshUploadFlag); + IRequestHandler reqHandler + = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), MeshUploadFlag, "MeshUploadFlag", agentID.ToString()); + caps.RegisterHandler("MeshUploadFlag", reqHandler); m_agentID = agentID; } diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs index 91872c5..52c4f44 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs @@ -115,67 +115,66 @@ namespace OpenSim.Region.ClientStack.Linden UUID capID = UUID.Random(); // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); - caps.RegisterHandler("NewFileAgentInventoryVariablePrice", - - new LLSDStreamhandler("POST", - "/CAPS/" + capID.ToString(), - delegate(LLSDAssetUploadRequest req) - { - return NewAgentInventoryRequest(req,agentID); - })); - + caps.RegisterHandler( + "NewFileAgentInventoryVariablePrice", + new LLSDStreamhandler( + "POST", + "/CAPS/" + capID.ToString(), + req => NewAgentInventoryRequest(req, agentID), + "NewFileAgentInventoryVariablePrice", + agentID.ToString())); } #endregion public LLSDNewFileAngentInventoryVariablePriceReplyResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest, UUID agentID) { - //TODO: The Mesh uploader uploads many types of content. If you're going to implement a Money based limit - // You need to be aware of this and - + // you need to be aware of this //if (llsdRequest.asset_type == "texture" || // llsdRequest.asset_type == "animation" || // llsdRequest.asset_type == "sound") // { // check user level - ScenePresence avatar = null; - IClientAPI client = null; - m_scene.TryGetScenePresence(agentID, out avatar); - if (avatar != null) + ScenePresence avatar = null; + IClientAPI client = null; + m_scene.TryGetScenePresence(agentID, out avatar); + + if (avatar != null) + { + client = avatar.ControllingClient; + + if (avatar.UserLevel < m_levelUpload) { - client = avatar.ControllingClient; - - if (avatar.UserLevel < m_levelUpload) - { - if (client != null) - client.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false); - - LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); - errorResponse.rsvp = ""; - errorResponse.state = "error"; - return errorResponse; - } + if (client != null) + client.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false); + + LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); + errorResponse.rsvp = ""; + errorResponse.state = "error"; + return errorResponse; } + } - // check funds - IMoneyModule mm = m_scene.RequestModuleInterface(); + // check funds + IMoneyModule mm = m_scene.RequestModuleInterface(); - if (mm != null) + if (mm != null) + { + if (!mm.UploadCovered(agentID, mm.UploadCharge)) { - if (!mm.UploadCovered(agentID, mm.UploadCharge)) - { - if (client != null) - client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); - - LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); - errorResponse.rsvp = ""; - errorResponse.state = "error"; - return errorResponse; - } + if (client != null) + client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); + + LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); + errorResponse.rsvp = ""; + errorResponse.state = "error"; + return errorResponse; } + } + // } string assetName = llsdRequest.name; @@ -189,8 +188,14 @@ namespace OpenSim.Region.ClientStack.Linden AssetUploader uploader = new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, llsdRequest.asset_type, capsBase + uploaderPath, MainServer.Instance, m_dumpAssetsToFile); + MainServer.Instance.AddStreamHandler( - new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); + new BinaryStreamHandler( + "POST", + capsBase + uploaderPath, + uploader.uploaderCaps, + "NewFileAgentInventoryVariablePrice", + agentID.ToString())); string protocol = "http://"; @@ -199,10 +204,9 @@ namespace OpenSim.Region.ClientStack.Linden string uploaderURL = protocol + m_scene.RegionInfo.ExternalHostName + ":" + MainServer.Instance.Port.ToString() + capsBase + uploaderPath; - + LLSDNewFileAngentInventoryVariablePriceReplyResponse uploadResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); - uploadResponse.rsvp = uploaderURL; uploadResponse.state = "upload"; @@ -220,6 +224,7 @@ namespace OpenSim.Region.ClientStack.Linden pinventoryItem, pparentFolder, pdata, pinventoryType, passetType,agentID); }; + return uploadResponse; } diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs index 1c47f0e..4ccfc43 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs @@ -66,12 +66,14 @@ namespace OpenSim.Region.ClientStack.Linden // m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); - caps.RegisterHandler("ObjectAdd", - new RestHTTPHandler("POST", "/CAPS/OA/" + capuuid + "/", - delegate(Hashtable m_dhttpMethod) - { - return ProcessAdd(m_dhttpMethod, agentID, caps); - })); + caps.RegisterHandler( + "ObjectAdd", + new RestHTTPHandler( + "POST", + "/CAPS/OA/" + capuuid + "/", + httpMethod => ProcessAdd(httpMethod, agentID, caps), + "ObjectAdd", + agentID.ToString()));; } public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index 7a3d97e..f0f3984 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs @@ -106,12 +106,15 @@ namespace OpenSim.Region.ClientStack.Linden UUID capID = UUID.Random(); // m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID); - caps.RegisterHandler("UploadObjectAsset", - new RestHTTPHandler("POST", "/CAPS/OA/" + capID + "/", - delegate(Hashtable m_dhttpMethod) - { - return ProcessAdd(m_dhttpMethod, agentID, caps); - })); + caps.RegisterHandler( + "UploadObjectAsset", + new RestHTTPHandler( + "POST", + "/CAPS/OA/" + capID + "/", + httpMethod => ProcessAdd(httpMethod, agentID, caps), + "UploadObjectAsset", + agentID.ToString())); + /* caps.RegisterHandler("NewFileAgentInventoryVariablePrice", diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index 1dd8938..8ed0fb3 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs @@ -154,7 +154,9 @@ namespace OpenSim.Region.ClientStack.Linden public void RegisterCaps(UUID agentID, Caps caps) { IRequestHandler reqHandler - = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), HandleSimulatorFeaturesRequest); + = new RestHTTPHandler( + "GET", "/CAPS/" + UUID.Random(), + HandleSimulatorFeaturesRequest, "SimulatorFeatures", agentID.ToString()); caps.RegisterHandler("SimulatorFeatures", reqHandler); } diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs index 45d6071..b3d61a8 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs @@ -106,7 +106,9 @@ namespace OpenSim.Region.ClientStack.Linden "POST", "/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath, new UploadBakedTextureHandler( - caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture)); + caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture, + "UploadBakedTexture", + agentID.ToString())); } } } \ No newline at end of file diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 10f43d1..2359bd6 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -144,7 +144,12 @@ namespace OpenSim.Region.ClientStack.Linden capUrl = "/CAPS/" + UUID.Random(); IRequestHandler reqHandler - = new RestStreamHandler("POST", capUrl, m_webFetchHandler.FetchInventoryDescendentsRequest); + = new RestStreamHandler( + "POST", + capUrl, + m_webFetchHandler.FetchInventoryDescendentsRequest, + "FetchInventoryDescendents2", + agentID.ToString()); caps.RegisterHandler(capName, reqHandler); } @@ -160,4 +165,4 @@ namespace OpenSim.Region.ClientStack.Linden // capName, capUrl, m_scene.RegionInfo.RegionName, agentID); } } -} +} \ No newline at end of file -- 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 --- .../ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 2 +- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 9791885..6c28e78 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -309,7 +309,7 @@ namespace OpenSim.Region.ClientStack.Linden m_HostCapsObj.HttpListener.AddStreamHandler( new BinaryStreamHandler( - "POST", capsBase + uploaderPath, uploader.uploaderCaps, "BunchOfCaps", null)); + "POST", capsBase + uploaderPath, uploader.uploaderCaps, "TaskInventoryScriptUpdater", null)); string protocol = "http://"; 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 6501b1b1bb297eb5ed8a44447f771c7b73b0e905 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 18 May 2012 00:38:29 +0100 Subject: refactor: move EventQueueGet path generation into common method. Rename some local variables in line with code conventions. Add commented out EQG log lines for future use. --- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 53 ++++++++++++++-------- 1 file changed, 33 insertions(+), 20 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 1a35d22..0054619 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -235,19 +235,19 @@ namespace OpenSim.Region.ClientStack.Linden // ClientClosed(client.AgentId); // } - private void ClientClosed(UUID AgentID, Scene scene) + private void ClientClosed(UUID agentID, Scene scene) { -// m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName); +// m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", agentID, m_scene.RegionInfo.RegionName); int count = 0; - while (queues.ContainsKey(AgentID) && queues[AgentID].Count > 0 && count++ < 5) + while (queues.ContainsKey(agentID) && queues[agentID].Count > 0 && count++ < 5) { Thread.Sleep(1000); } lock (queues) { - queues.Remove(AgentID); + queues.Remove(agentID); } List removeitems = new List(); @@ -256,7 +256,7 @@ namespace OpenSim.Region.ClientStack.Linden foreach (UUID ky in m_AvatarQueueUUIDMapping.Keys) { // m_log.DebugFormat("[EVENTQUEUE]: Found key {0} in m_AvatarQueueUUIDMapping while looking for {1}", ky, AgentID); - if (ky == AgentID) + if (ky == agentID) { removeitems.Add(ky); } @@ -267,7 +267,10 @@ namespace OpenSim.Region.ClientStack.Linden UUID eventQueueGetUuid = m_AvatarQueueUUIDMapping[ky]; m_AvatarQueueUUIDMapping.Remove(ky); - MainServer.Instance.RemovePollServiceHTTPHandler("","/CAPS/EQG/" + eventQueueGetUuid.ToString() + "/"); + string eqgPath = GenerateEqgCapPath(eventQueueGetUuid); + MainServer.Instance.RemovePollServiceHTTPHandler("", eqgPath); + +// m_log.DebugFormat("[EVENT QUEUE GET MODULE]: Removed EQG handler {0} for {1}", eqgPath, agentID); } } @@ -281,7 +284,7 @@ namespace OpenSim.Region.ClientStack.Linden { searchval = m_QueueUUIDAvatarMapping[ky]; - if (searchval == AgentID) + if (searchval == agentID) { removeitems.Add(ky); } @@ -305,6 +308,15 @@ namespace OpenSim.Region.ClientStack.Linden //} } + /// + /// Generate an Event Queue Get handler path for the given eqg uuid. + /// + /// + private string GenerateEqgCapPath(UUID eqgUuid) + { + return string.Format("/CAPS/EQG/{0}/", eqgUuid); + } + public void OnRegisterCaps(UUID agentID, Caps caps) { // Register an event queue for the client @@ -316,8 +328,7 @@ namespace OpenSim.Region.ClientStack.Linden // Let's instantiate a Queue for this agent right now TryGetQueue(agentID); - string capsBase = "/CAPS/EQG/"; - UUID EventQueueGetUUID = UUID.Zero; + UUID eventQueueGetUUID; lock (m_AvatarQueueUUIDMapping) { @@ -325,37 +336,35 @@ namespace OpenSim.Region.ClientStack.Linden if (m_AvatarQueueUUIDMapping.ContainsKey(agentID)) { //m_log.DebugFormat("[EVENTQUEUE]: Found Existing UUID!"); - EventQueueGetUUID = m_AvatarQueueUUIDMapping[agentID]; + eventQueueGetUUID = m_AvatarQueueUUIDMapping[agentID]; } else { - EventQueueGetUUID = UUID.Random(); + eventQueueGetUUID = UUID.Random(); //m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!"); } } lock (m_QueueUUIDAvatarMapping) { - if (!m_QueueUUIDAvatarMapping.ContainsKey(EventQueueGetUUID)) - m_QueueUUIDAvatarMapping.Add(EventQueueGetUUID, agentID); + if (!m_QueueUUIDAvatarMapping.ContainsKey(eventQueueGetUUID)) + m_QueueUUIDAvatarMapping.Add(eventQueueGetUUID, agentID); } lock (m_AvatarQueueUUIDMapping) { if (!m_AvatarQueueUUIDMapping.ContainsKey(agentID)) - m_AvatarQueueUUIDMapping.Add(agentID, EventQueueGetUUID); + m_AvatarQueueUUIDMapping.Add(agentID, eventQueueGetUUID); } + string eventQueueGetPath = GenerateEqgCapPath(eventQueueGetUUID); + // Register this as a caps handler // FIXME: Confusingly, we need to register separate as a capability so that the client is told about // EventQueueGet when it receive capability information, but then we replace the rest handler immediately // afterwards with the poll service. So for now, we'll pass a null instead to simplify code reading, but // really it should be possible to directly register the poll handler as a capability. - caps.RegisterHandler( - "EventQueueGet", - new RestHTTPHandler( - "POST", capsBase + EventQueueGetUUID.ToString() + "/", null)); - + caps.RegisterHandler("EventQueueGet", new RestHTTPHandler("POST", eventQueueGetPath, null)); // delegate(Hashtable m_dhttpMethod) // { // return ProcessQueue(m_dhttpMethod, agentID, caps); @@ -364,9 +373,13 @@ namespace OpenSim.Region.ClientStack.Linden // This will persist this beyond the expiry of the caps handlers // TODO: Add EventQueueGet name/description for diagnostics MainServer.Instance.AddPollServiceHTTPHandler( - capsBase + EventQueueGetUUID.ToString() + "/", + eventQueueGetPath, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); +// m_log.DebugFormat( +// "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}", +// eventQueueGetPath, agentID, m_scene.RegionInfo.RegionName); + Random rnd = new Random(Environment.TickCount); lock (m_ids) { -- cgit v1.1 From 45af29291acd22700d9fc4c442655d2e3f19a0b0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 18 May 2012 03:43:36 +0100 Subject: Add level 2 debug eq logging which logs event queue polls. Refactor: eq message logging into common method. --- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 55 +++++++++++++--------- 1 file changed, 32 insertions(+), 23 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 0054619..6ac19cc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -109,10 +109,11 @@ namespace OpenSim.Region.ClientStack.Linden "Comms", false, "debug eq", - "debug eq [0|1]", - "Turn on event queue debugging", - "debug eq 1 will turn on event queue debugging. This will log all outgoing event queue messages to clients.\n" - + "debug eq 0 will turn off event queue debugging.", + "debug eq [0|1|2]", + "Turn on event queue debugging", + "<= 0 - turns off all event queue logging", + ">= 1 - turns on outgoing event logging", + ">= 2 - turns on poll notification", HandleDebugEq); } else @@ -270,7 +271,9 @@ namespace OpenSim.Region.ClientStack.Linden string eqgPath = GenerateEqgCapPath(eventQueueGetUuid); MainServer.Instance.RemovePollServiceHTTPHandler("", eqgPath); -// m_log.DebugFormat("[EVENT QUEUE GET MODULE]: Removed EQG handler {0} for {1}", eqgPath, agentID); + m_log.DebugFormat( + "[EVENT QUEUE GET MODULE]: Removed EQG handler {0} for {1} in {2}", + eqgPath, agentID, m_scene.RegionInfo.RegionName); } } @@ -376,9 +379,9 @@ namespace OpenSim.Region.ClientStack.Linden eventQueueGetPath, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); -// m_log.DebugFormat( -// "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}", -// eventQueueGetPath, agentID, m_scene.RegionInfo.RegionName); + m_log.DebugFormat( + "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}", + eventQueueGetPath, agentID, m_scene.RegionInfo.RegionName); Random rnd = new Random(Environment.TickCount); lock (m_ids) @@ -401,9 +404,25 @@ namespace OpenSim.Region.ClientStack.Linden return false; } + /// + /// Logs a debug line for an outbound event queue message if appropriate. + /// + /// Element containing message + private void LogOutboundDebugMessage(OSD element, UUID agentId) + { + if (element is OSDMap) + { + OSDMap ev = (OSDMap)element; + m_log.DebugFormat( + "Eq OUT {0,-30} to {1,-20} {2,-20}", + ev["message"], m_scene.GetScenePresence(agentId).Name, m_scene.RegionInfo.RegionName); + } + } + public Hashtable GetEvents(UUID requestID, UUID pAgentId, string request) { -// m_log.DebugFormat("[EVENT QUEUE GET MODULE]: Invoked GetEvents() for {0}", pAgentId); + if (DebugLevel >= 2) + m_log.DebugFormat("POLLED FOR EQ MESSAGES BY {0} in {1}", pAgentId, m_scene.RegionInfo.RegionName); Queue queue = TryGetQueue(pAgentId); OSD element; @@ -427,13 +446,8 @@ namespace OpenSim.Region.ClientStack.Linden } else { - if (DebugLevel > 0 && element is OSDMap) - { - OSDMap ev = (OSDMap)element; - m_log.DebugFormat( - "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}", - ev["message"], m_scene.GetScenePresence(pAgentId).Name); - } + if (DebugLevel > 0) + LogOutboundDebugMessage(element, pAgentId); array.Add(element); @@ -443,13 +457,8 @@ namespace OpenSim.Region.ClientStack.Linden { element = queue.Dequeue(); - if (DebugLevel > 0 && element is OSDMap) - { - OSDMap ev = (OSDMap)element; - m_log.DebugFormat( - "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}", - ev["message"], m_scene.GetScenePresence(pAgentId).Name); - } + if (DebugLevel > 0) + LogOutboundDebugMessage(element, pAgentId); array.Add(element); thisID++; -- cgit v1.1 From 0147dc63028e2d77a568c6d9d5af1c9f05286f62 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 18 May 2012 03:50:23 +0100 Subject: Fix build break. Comment out EQG deregister/register logging. --- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 6ac19cc..ae759ca 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -110,10 +110,10 @@ namespace OpenSim.Region.ClientStack.Linden false, "debug eq", "debug eq [0|1|2]", - "Turn on event queue debugging", - "<= 0 - turns off all event queue logging", - ">= 1 - turns on outgoing event logging", - ">= 2 - turns on poll notification", + "Turn on event queue debugging" + + "<= 0 - turns off all event queue logging" + + ">= 1 - turns on outgoing event logging" + + ">= 2 - turns on poll notification", HandleDebugEq); } else @@ -271,9 +271,9 @@ namespace OpenSim.Region.ClientStack.Linden string eqgPath = GenerateEqgCapPath(eventQueueGetUuid); MainServer.Instance.RemovePollServiceHTTPHandler("", eqgPath); - m_log.DebugFormat( - "[EVENT QUEUE GET MODULE]: Removed EQG handler {0} for {1} in {2}", - eqgPath, agentID, m_scene.RegionInfo.RegionName); +// m_log.DebugFormat( +// "[EVENT QUEUE GET MODULE]: Removed EQG handler {0} for {1} in {2}", +// eqgPath, agentID, m_scene.RegionInfo.RegionName); } } @@ -379,9 +379,9 @@ namespace OpenSim.Region.ClientStack.Linden eventQueueGetPath, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); - m_log.DebugFormat( - "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}", - eventQueueGetPath, agentID, m_scene.RegionInfo.RegionName); +// m_log.DebugFormat( +// "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}", +// eventQueueGetPath, agentID, m_scene.RegionInfo.RegionName); Random rnd = new Random(Environment.TickCount); lock (m_ids) -- 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') 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') 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') 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') 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') 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') 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') 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') 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') 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') 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') 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') 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') 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') 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') 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') 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') 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 6a77a656753fd5433cbb105649b8dd1e3cf83337 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 14 Jun 2012 00:35:26 +0100 Subject: minor: remove unnecessary IsAttachment = false setting for new object in UploadObjectAssetModule, property always starts as false --- .../Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index f0f3984..ba902b2 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs @@ -333,7 +333,6 @@ namespace OpenSim.Region.ClientStack.Linden grp.AbsolutePosition = obj.Position; prim.RotationOffset = obj.Rotation; - grp.IsAttachment = false; // Required for linking grp.RootPart.ClearUpdateSchedule(); -- 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') 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') 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') 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') 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 6993a26ba599ae38dc6f66332980657d5621987a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Jun 2012 00:40:12 +0100 Subject: Get rid of some unnecessary null checks in RegionApplicationBase.StartupSpecific() - a constructor can never return null. Also adds some method doc to MainServer --- OpenSim/Region/ClientStack/RegionApplicationBase.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 6e78d6d..27a5879 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -99,17 +99,13 @@ namespace OpenSim.Region.ClientStack // "OOB" Server if (m_networkServersInfo.ssl_listener) { - BaseHttpServer server = null; - server = new BaseHttpServer( + BaseHttpServer server = new BaseHttpServer( m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, m_networkServersInfo.cert_pass); - // Add the server to m_Servers - if(server != null) - { - m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); - MainServer.AddHttpServer(server); - server.Start(); - } + + m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); + MainServer.AddHttpServer(server); + server.Start(); } base.StartupSpecific(); -- cgit v1.1 From 257b1b517dec58bf902bac63bc7ab7080286d415 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Jun 2012 02:03:50 +0100 Subject: Add main instance to internal MainServer.m_Servers list to simplify internal logic. This does require the server to be added before it is set as the main Instance --- .../Linden/Caps/EventQueue/Tests/EventQueueTests.cs | 11 ++++++++++- OpenSim/Region/ClientStack/RegionApplicationBase.cs | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs index c25b58c..cd70410 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs @@ -51,7 +51,16 @@ namespace OpenSim.Region.ClientStack.Linden.Tests [SetUp] public void SetUp() { - MainServer.Instance = new BaseHttpServer(9999, false, 9998, ""); + uint port = 9999; + uint sslPort = 9998; + + // This is an unfortunate bit of clean up we have to do because MainServer manages things through static + // variables and the VM is not restarted between tests. + MainServer.RemoveHttpServer(port); + + BaseHttpServer server = new BaseHttpServer(port, false, sslPort, ""); + MainServer.AddHttpServer(server); + MainServer.Instance = server; IConfigSource config = new IniConfigSource(); config.AddConfig("Startup"); diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 27a5879..c4324e8 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -94,6 +94,7 @@ namespace OpenSim.Region.ClientStack m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort); m_httpServer.Start(); + MainServer.AddHttpServer(m_httpServer); MainServer.Instance = m_httpServer; // "OOB" Server -- cgit v1.1 From c935f0346750d510e5c3c3c2ff62c84609a115e3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Jun 2012 03:32:43 +0100 Subject: Put all debug console commands into a single Debug section rather than scattering them over other categories --- .../Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index ae759ca..594b229 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -106,7 +106,7 @@ namespace OpenSim.Region.ClientStack.Linden scene.EventManager.OnRegisterCaps += OnRegisterCaps; MainConsole.Instance.Commands.AddCommand( - "Comms", + "Debug", false, "debug eq", "debug eq [0|1|2]", -- 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') 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') 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') 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') 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') 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') 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') 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