aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-07-18 23:05:45 +0100
committerDiva Canto2013-07-21 08:58:21 -0700
commit5a2d4d888c02bef984f42eecaec62164a1e58b72 (patch)
tree4951d2dbab039696c3424fb570890c2e024c8edd
parentminor: provide user feedback in the log for now when udp in/out bound threads... (diff)
downloadopensim-SC_OLD-5a2d4d888c02bef984f42eecaec62164a1e58b72.zip
opensim-SC_OLD-5a2d4d888c02bef984f42eecaec62164a1e58b72.tar.gz
opensim-SC_OLD-5a2d4d888c02bef984f42eecaec62164a1e58b72.tar.bz2
opensim-SC_OLD-5a2d4d888c02bef984f42eecaec62164a1e58b72.tar.xz
Hack in console command "debug lludp toggle agentupdate" to allow AgentUpdate in packets to be discarded at a very early stage.
Enabling this will stop anybody from moving on a sim, though all other updates should be unaffected. Appears to make some cpu difference on very basic testing with a static standing avatar (though not all that much). Need to see the results with much higher av numbers.
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index a1085fa..78d4165 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -572,6 +572,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
572 "debug lludp status", 572 "debug lludp status",
573 "Return status of LLUDP packet processing.", 573 "Return status of LLUDP packet processing.",
574 HandleStatusCommand); 574 HandleStatusCommand);
575
576 MainConsole.Instance.Commands.AddCommand(
577 "Debug",
578 false,
579 "debug lludp toggle agentupdate",
580 "debug lludp toggle agentupdate",
581 "Toggle whether agentupdate packets are processed or simply discarded.",
582 HandleAgentUpdateCommand);
575 } 583 }
576 584
577 private void HandlePacketCommand(string module, string[] args) 585 private void HandlePacketCommand(string module, string[] args)
@@ -706,6 +714,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
706 } 714 }
707 } 715 }
708 716
717 bool m_discardAgentUpdates;
718
719 private void HandleAgentUpdateCommand(string module, string[] args)
720 {
721 if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene)
722 return;
723
724 m_discardAgentUpdates = !m_discardAgentUpdates;
725
726 MainConsole.Instance.OutputFormat(
727 "Discard AgentUpdates now {0} for {1}", m_discardAgentUpdates, m_scene.Name);
728 }
729
709 private void HandleStatusCommand(string module, string[] args) 730 private void HandleStatusCommand(string module, string[] args)
710 { 731 {
711 if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) 732 if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene)
@@ -1286,6 +1307,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1286 LogPacketHeader(true, udpClient.CircuitCode, 0, packet.Type, (ushort)packet.Length); 1307 LogPacketHeader(true, udpClient.CircuitCode, 0, packet.Type, (ushort)packet.Length);
1287 #endregion BinaryStats 1308 #endregion BinaryStats
1288 1309
1310 if (m_discardAgentUpdates && packet.Type == PacketType.AgentUpdate)
1311 return;
1312
1289 #region Ping Check Handling 1313 #region Ping Check Handling
1290 1314
1291 if (packet.Type == PacketType.StartPingCheck) 1315 if (packet.Type == PacketType.StartPingCheck)