From e19defde36ddbd5ff90d8304c6fe3b57110f8078 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 8 Jul 2013 22:03:07 +0100 Subject: Add "show caps stats by user" and "show caps stats by cap" console commands to print various counts of capability invocation by user and by cap This currently prints caps requests received and handled, so that overload of received compared to handled or deadlock can be detected. This involves making BaseStreamHandler and BaseOutputStream record the ints, which means inheritors should subclass ProcessRequest() instead of Handle() However, existing inheriting classes overriding Handle() will still work, albeit without stats recording. "show caps" becomes "show caps list" to disambiguate between show caps commands --- OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs | 2 +- .../Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs index 1ea1c20..6e0a80a 100644 --- a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs +++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs @@ -281,7 +281,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport m_module = module; } - public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) + protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { StreamReader reader = new StreamReader(request); string requestBody = reader.ReadToEnd(); diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs index 550b5d4..8720cc7 100644 --- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs +++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.OptionalModules.World.WorldView m_WorldViewModule = fmodule; } - public override byte[] Handle(string path, Stream requestData, + protected override byte[] ProcessRequest(string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { httpResponse.ContentType = "image/jpeg"; -- cgit v1.1 From 013710168b3878fc0a93a92a1c026efb49da9935 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 8 Jul 2013 22:39:07 +0100 Subject: For stat purposes, add names to capability request handlers where these were not set --- .../Region/OptionalModules/Materials/MaterialsDemoModule.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs index 3a39971..00504d0 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs @@ -139,18 +139,21 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule { string capsBase = "/CAPS/" + caps.CapsObjectPath; - IRequestHandler renderMaterialsPostHandler = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap); - caps.RegisterHandler("RenderMaterials", renderMaterialsPostHandler); + IRequestHandler renderMaterialsPostHandler + = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap, "RenderMaterialsPost", null); + caps.RegisterHandler("RenderMaterialsPost", renderMaterialsPostHandler); // OpenSimulator CAPs infrastructure seems to be somewhat hostile towards any CAP that requires both GET // and POST handlers, (at least at the time this was originally written), so we first set up a POST // handler normally and then add a GET handler via MainServer - IRequestHandler renderMaterialsGetHandler = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap); + IRequestHandler renderMaterialsGetHandler + = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap, "RenderMaterialsGet", null); MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler); // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well - IRequestHandler renderMaterialsPutHandler = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap); + IRequestHandler renderMaterialsPutHandler + = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap, "RenderMaterialsPut", null); MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler); } -- cgit v1.1 From 33eea62606908ca39ac90eb9c99b0eee3c5f39de Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 8 Jul 2013 17:12:39 -0700 Subject: remove an invalid null UUID check which caused a warning --- OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs index 00504d0..b997d4d 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs @@ -416,14 +416,7 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule if (te.DefaultTexture == null) m_log.Debug("[MaterialsDemoModule]: te.DefaultTexture is null"); else - { - if (te.DefaultTexture.MaterialID == null) - m_log.Debug("[MaterialsDemoModule]: te.DefaultTexture.MaterialID is null"); - else - { - te.DefaultTexture.MaterialID = id; - } - } + te.DefaultTexture.MaterialID = id; } else { -- cgit v1.1 From 065f8f56a248724c34d115f77a4d5b1a422f26f4 Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 8 Jul 2013 19:18:01 -0700 Subject: remove some cruft and trigger a rebuild --- OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs index b997d4d..0a0d65c 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs @@ -397,7 +397,6 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule m_log.Debug("[MaterialsDemoModule]: null SOP for localId: " + matLocalID.ToString()); else { - //var te = sop.Shape.Textures; var te = new Primitive.TextureEntry(sop.Shape.TextureEntry, 0, sop.Shape.TextureEntry.Length); if (te == null) -- cgit v1.1 From 1b265b213b65076ee346d85f62d2d61a72ea3ca6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 10 Jul 2013 16:09:45 -0700 Subject: Added show client-stats [first last] command to expose what viewers are requesting. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 109 ++++++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 992f38e..b1aec81 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Reflection; using System.Text; using log4net; @@ -51,7 +52,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")] public class LindenUDPInfoModule : ISharedRegionModule { -// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Dictionary m_scenes = new Dictionary(); @@ -130,6 +131,15 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Go on/off emergency monitoring mode", "Go on/off emergency monitoring mode", HandleEmergencyMonitoring); + + scene.AddCommand( + "Comms", this, "show client-stats", + "show client-stats [first_name last_name]", + "Show client request stats", + "Without the 'first_name last_name' option, all clients are shown." + + " With the 'first_name last_name' option only a specific client is shown.", + (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); + } public void RemoveRegion(Scene scene) @@ -587,6 +597,101 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden (throttleRates.Asset * 8) / 1000); return report.ToString(); - } + } + + /// + /// Show client stats data + /// + /// + /// + protected string HandleClientStatsReport(string[] showParams) + { + // NOTE: This writes to m_log on purpose. We want to store this information + // in case we need to analyze it later. + // + if (showParams.Length <= 3) + { + m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,6} {3,11} {4, 10}", "Region", "Name", "Root", "Time", "Reqs/min"); + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is LLClientView) + { + LLClientView llClient = client as LLClientView; + ClientInfo cinfo = llClient.UDPClient.GetClientInfo(); + int avg_reqs = cinfo.AsyncRequests.Count + cinfo.GenericRequests.Count + cinfo.SyncRequests.Count; + avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); + + m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,4} {3,9}min {4,10}", + scene.RegionInfo.RegionName, llClient.Name, + (llClient.SceneAgent.IsChildAgent ? "N" : "Y"), (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs); + } + }); + } + return string.Empty; + } + + string fname = "", lname = ""; + + if (showParams.Length > 2) + fname = showParams[2]; + if (showParams.Length > 3) + lname = showParams[3]; + + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is LLClientView) + { + LLClientView llClient = client as LLClientView; + + if (llClient.Name == fname + " " + lname) + { + + ClientInfo cinfo = llClient.GetClientInfo(); + AgentCircuitData aCircuit = scene.AuthenticateHandler.GetAgentCircuitData(llClient.CircuitCode); + if (aCircuit == null) // create a dummy one + aCircuit = new AgentCircuitData(); + + if (!llClient.SceneAgent.IsChildAgent) + m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, aCircuit.Viewer, aCircuit.Id0); + + int avg_reqs = cinfo.AsyncRequests.Count + cinfo.GenericRequests.Count + cinfo.SyncRequests.Count; + avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); + + m_log.InfoFormat("[INFO]:"); + m_log.InfoFormat("[INFO]: {0} # {1} # Time: {2}min # Avg Reqs/min: {3}", scene.RegionInfo.RegionName, + (llClient.SceneAgent.IsChildAgent ? "Child" : "Root"), (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs); + + Dictionary sortedDict = (from entry in cinfo.AsyncRequests orderby entry.Value descending select entry) + .ToDictionary(pair => pair.Key, pair => pair.Value); + + m_log.InfoFormat("[INFO]: {0,25}", "TOP ASYNC"); + foreach (KeyValuePair kvp in sortedDict.Take(12)) + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + + m_log.InfoFormat("[INFO]:"); + sortedDict = (from entry in cinfo.SyncRequests orderby entry.Value descending select entry) + .ToDictionary(pair => pair.Key, pair => pair.Value); + m_log.InfoFormat("[INFO]: {0,25}", "TOP SYNC"); + foreach (KeyValuePair kvp in sortedDict.Take(12)) + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + + m_log.InfoFormat("[INFO]:"); + sortedDict = (from entry in cinfo.GenericRequests orderby entry.Value descending select entry) + .ToDictionary(pair => pair.Key, pair => pair.Value); + m_log.InfoFormat("[INFO]: {0,25}", "TOP GENERIC"); + foreach (KeyValuePair kvp in sortedDict.Take(12)) + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + } + } + }); + } + return string.Empty; + } } } \ No newline at end of file -- cgit v1.1 From bdaeb02863cb56e0d543b1e97eb3356571911f90 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 10 Jul 2013 17:14:20 -0700 Subject: show client stats: Fixed the requests/min. Also changed the spelling of the command, not without the dash. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 43 +++++++++++----------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index b1aec81..79509ab 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -133,8 +133,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden HandleEmergencyMonitoring); scene.AddCommand( - "Comms", this, "show client-stats", - "show client-stats [first_name last_name]", + "Comms", this, "show client stats", + "show client stats [first_name last_name]", "Show client request stats", "Without the 'first_name last_name' option, all clients are shown." + " With the 'first_name last_name' option only a specific client is shown.", @@ -609,7 +609,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden // NOTE: This writes to m_log on purpose. We want to store this information // in case we need to analyze it later. // - if (showParams.Length <= 3) + if (showParams.Length <= 4) { m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,6} {3,11} {4, 10}", "Region", "Name", "Root", "Time", "Reqs/min"); foreach (Scene scene in m_scenes.Values) @@ -621,7 +621,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden { LLClientView llClient = client as LLClientView; ClientInfo cinfo = llClient.UDPClient.GetClientInfo(); - int avg_reqs = cinfo.AsyncRequests.Count + cinfo.GenericRequests.Count + cinfo.SyncRequests.Count; + int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,4} {3,9}min {4,10}", @@ -635,10 +635,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden string fname = "", lname = ""; - if (showParams.Length > 2) - fname = showParams[2]; if (showParams.Length > 3) - lname = showParams[3]; + fname = showParams[3]; + if (showParams.Length > 4) + lname = showParams[4]; foreach (Scene scene in m_scenes.Values) { @@ -660,7 +660,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden if (!llClient.SceneAgent.IsChildAgent) m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, aCircuit.Viewer, aCircuit.Id0); - int avg_reqs = cinfo.AsyncRequests.Count + cinfo.GenericRequests.Count + cinfo.SyncRequests.Count; + int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); m_log.InfoFormat("[INFO]:"); @@ -669,29 +669,30 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden Dictionary sortedDict = (from entry in cinfo.AsyncRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); + PrintRequests("TOP ASYNC", sortedDict, cinfo.AsyncRequests.Values.Sum()); - m_log.InfoFormat("[INFO]: {0,25}", "TOP ASYNC"); - foreach (KeyValuePair kvp in sortedDict.Take(12)) - m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); - - m_log.InfoFormat("[INFO]:"); sortedDict = (from entry in cinfo.SyncRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - m_log.InfoFormat("[INFO]: {0,25}", "TOP SYNC"); - foreach (KeyValuePair kvp in sortedDict.Take(12)) - m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + PrintRequests("TOP SYNC", sortedDict, cinfo.SyncRequests.Values.Sum()); - m_log.InfoFormat("[INFO]:"); sortedDict = (from entry in cinfo.GenericRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - m_log.InfoFormat("[INFO]: {0,25}", "TOP GENERIC"); - foreach (KeyValuePair kvp in sortedDict.Take(12)) - m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + PrintRequests("TOP GENERIC", sortedDict, cinfo.GenericRequests.Values.Sum()); } } }); } return string.Empty; - } + } + + private void PrintRequests(string type, Dictionary sortedDict, int sum) + { + m_log.InfoFormat("[INFO]:"); + m_log.InfoFormat("[INFO]: {0,25}", type); + foreach (KeyValuePair kvp in sortedDict.Take(12)) + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + m_log.InfoFormat("[INFO]: {0,25}", "..."); + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", "Total", sum); + } } } \ No newline at end of file -- cgit v1.1 From 0120e858b7985b0f9571461d036a9099a25af9ad Mon Sep 17 00:00:00 2001 From: dahlia Date: Wed, 10 Jul 2013 22:30:41 -0700 Subject: remove names from Capability handlers (added by justincc in commit 013710168b3878fc0a93a92a1c026efb49da9935) as they seem to disable the use of multiple access methods for a single Capability in MaterialsDemoModule --- .../Region/OptionalModules/Materials/MaterialsDemoModule.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs index 0a0d65c..088eb0f 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs @@ -139,21 +139,18 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule { string capsBase = "/CAPS/" + caps.CapsObjectPath; - IRequestHandler renderMaterialsPostHandler - = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap, "RenderMaterialsPost", null); - caps.RegisterHandler("RenderMaterialsPost", renderMaterialsPostHandler); + IRequestHandler renderMaterialsPostHandler = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap); + caps.RegisterHandler("RenderMaterials", renderMaterialsPostHandler); // OpenSimulator CAPs infrastructure seems to be somewhat hostile towards any CAP that requires both GET // and POST handlers, (at least at the time this was originally written), so we first set up a POST // handler normally and then add a GET handler via MainServer - IRequestHandler renderMaterialsGetHandler - = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap, "RenderMaterialsGet", null); + IRequestHandler renderMaterialsGetHandler = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap); MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler); // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well - IRequestHandler renderMaterialsPutHandler - = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap, "RenderMaterialsPut", null); + IRequestHandler renderMaterialsPutHandler = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap); MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler); } -- cgit v1.1 From ba8f9c9d0a7d07b7587663baef9c52293a3ac404 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 11 Jul 2013 23:51:10 +0100 Subject: Try naming the materials handlers again, this time registering the POST as RenderMaterials This was probably the mistake. The other handlers are named RenderMaterials as well but this actully has no affect apart from on stats, due to a (counterintuitive) disconnect between the registration name and the name of the request handler. Will be tested very soon and reverted if this still does not work. --- OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs index 088eb0f..d8f5563 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsDemoModule.cs @@ -139,18 +139,21 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule { string capsBase = "/CAPS/" + caps.CapsObjectPath; - IRequestHandler renderMaterialsPostHandler = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap); + IRequestHandler renderMaterialsPostHandler + = new RestStreamHandler("POST", capsBase + "/", RenderMaterialsPostCap, "RenderMaterials", null); caps.RegisterHandler("RenderMaterials", renderMaterialsPostHandler); // OpenSimulator CAPs infrastructure seems to be somewhat hostile towards any CAP that requires both GET // and POST handlers, (at least at the time this was originally written), so we first set up a POST // handler normally and then add a GET handler via MainServer - IRequestHandler renderMaterialsGetHandler = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap); + IRequestHandler renderMaterialsGetHandler + = new RestStreamHandler("GET", capsBase + "/", RenderMaterialsGetCap, "RenderMaterials", null); MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler); // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well - IRequestHandler renderMaterialsPutHandler = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap); + IRequestHandler renderMaterialsPutHandler + = new RestStreamHandler("PUT", capsBase + "/", RenderMaterialsPostCap, "RenderMaterials", null); MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler); } -- cgit v1.1