From c92a9a664035ad4c36a0ac905751d105770dca51 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 19 Jan 2012 19:49:06 +0000 Subject: Add "image queues clear " console command This allows a way to manually clear pending image queue requests for debug purposes --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 75 +++++++++++++++++----- 1 file changed, 60 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index db70e56..95aa864 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -79,7 +79,19 @@ namespace OpenSim.Region.CoreModules.UDP.Linden // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); lock (m_scenes) - m_scenes[scene.RegionInfo.RegionID] = scene; + m_scenes[scene.RegionInfo.RegionID] = scene; + + scene.AddCommand( + this, "image queues clear", + "image queues clear ", + "Clear the image queues (textures downloaded via UDP) for a particular client.", + (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); + + scene.AddCommand( + this, "show image queues", + "image queues show ", + "Show the image queues (textures downloaded via UDP) for a particular client.", + (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); scene.AddCommand( this, "show pqueues", @@ -116,7 +128,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "emergency-monitoring", "Go on/off emergency monitoring mode", "Go on/off emergency monitoring mode", - EmergencyMonitoring); + HandleEmergencyMonitoring); } public void RemoveRegion(Scene scene) @@ -132,7 +144,49 @@ namespace OpenSim.Region.CoreModules.UDP.Linden // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); } - protected void EmergencyMonitoring(string module, string[] cmd) + protected string HandleImageQueuesClear(string[] cmd) + { + if (cmd.Length != 5) + return "Usage: image queues clear "; + + string firstName = cmd[3]; + string lastName = cmd[4]; + + List foundAgents = new List(); + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + ScenePresence sp = scene.GetScenePresence(firstName, lastName); + if (sp != null) + foundAgents.Add(sp); + } + } + + if (foundAgents.Count == 0) + return string.Format("No agents found for {0} {1}", firstName, lastName); + + StringBuilder report = new StringBuilder(); + + foreach (ScenePresence agent in foundAgents) + { + LLClientView client = agent.ControllingClient as LLClientView; + + if (client == null) + return "This command is only supported for LLClientView"; + + int requestsDeleted = client.ImageManager.ClearImageQueue(); + + report.AppendFormat( + "In region {0} ({1} agent) cleared {2} requests\n", + agent.Scene.RegionInfo.RegionName, agent.IsChildAgent ? "child" : "root", requestsDeleted); + } + + return report.ToString(); + } + + protected void HandleEmergencyMonitoring(string module, string[] cmd) { bool mode = true; if (cmd.Length == 1 || (cmd.Length > 1 && cmd[1] == "on")) @@ -239,10 +293,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden private string GetImageQueuesReport(string[] showParams) { if (showParams.Length < 5 || showParams.Length > 6) - { - MainConsole.Instance.OutputFormat("Usage: show image queues [full]"); - return ""; - } + return "Usage: show image queues [full]"; string firstName = showParams[3]; string lastName = showParams[4]; @@ -262,10 +313,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden } if (foundAgents.Count == 0) - { - MainConsole.Instance.OutputFormat("No agents found for {0} {1}", firstName, lastName); - return ""; - } + return string.Format("No agents found for {0} {1}", firstName, lastName); StringBuilder report = new StringBuilder(); @@ -274,10 +322,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden LLClientView client = agent.ControllingClient as LLClientView; if (client == null) - { - MainConsole.Instance.OutputFormat("This command is only supported for LLClientView"); - return ""; - } + return "This command is only supported for LLClientView"; J2KImage[] images = client.ImageManager.GetImages(); -- cgit v1.1 From b6f3de5028ab9a288f60b020a0dffda079dc550d Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 20 Jan 2012 23:50:37 -0500 Subject: Telehub Support: Support for viewer side of telehub management. Can manupulate Telehubs and SpawnPoints from the viewer estate managemnt tools. This is a work in progress and does not yet persist or affect teleport routing. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 32de85f..bbf3729 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -658,6 +658,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event ModifyTerrain OnModifyTerrain; public event BakeTerrain OnBakeTerrain; public event EstateChangeInfo OnEstateChangeInfo; + public event EstateManageTelehub OnEstateManageTelehub; public event SetAppearance OnSetAppearance; public event AvatarNowWearing OnAvatarNowWearing; public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; @@ -1530,6 +1531,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } + public void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List SpawnPoint) + { + + } + public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) { -- cgit v1.1