aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring/StatsManager.cs
diff options
context:
space:
mode:
authorMelanie Thielker2015-02-18 01:14:08 +0100
committerMelanie Thielker2015-02-18 01:14:08 +0100
commitfed566b8d3bb480ec89615e011934c10023a4dad (patch)
tree13c497f738651fe766ae115c92ee3a06fe5efe24 /OpenSim/Framework/Monitoring/StatsManager.cs
parentfix axis locking Amotor (diff)
downloadopensim-SC_OLD-fed566b8d3bb480ec89615e011934c10023a4dad.zip
opensim-SC_OLD-fed566b8d3bb480ec89615e011934c10023a4dad.tar.gz
opensim-SC_OLD-fed566b8d3bb480ec89615e011934c10023a4dad.tar.bz2
opensim-SC_OLD-fed566b8d3bb480ec89615e011934c10023a4dad.tar.xz
Abbreviate the stats by removing unneeded and redundant elements. Human readability is overrated. Also add a (hardcoded) password.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Monitoring/StatsManager.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs
index 05ee4c5..249cef6 100644
--- a/OpenSim/Framework/Monitoring/StatsManager.cs
+++ b/OpenSim/Framework/Monitoring/StatsManager.cs
@@ -253,7 +253,7 @@ namespace OpenSim.Framework.Monitoring
253 if (!(String.IsNullOrEmpty(pStatName) || pStatName == AllSubCommand || pStatName == statName)) 253 if (!(String.IsNullOrEmpty(pStatName) || pStatName == AllSubCommand || pStatName == statName))
254 continue; 254 continue;
255 255
256 statMap.Add(statName, theStats[statName].ToOSDMap()); 256 statMap.Add(statName, theStats[statName].ToBriefOSDMap());
257 } 257 }
258 258
259 contMap.Add(contName, statMap); 259 contMap.Add(contName, statMap);
@@ -275,6 +275,17 @@ namespace OpenSim.Framework.Monitoring
275 string pContainerName = StatsManager.AllSubCommand; 275 string pContainerName = StatsManager.AllSubCommand;
276 string pStatName = StatsManager.AllSubCommand; 276 string pStatName = StatsManager.AllSubCommand;
277 277
278 if (!request.ContainsKey("pass") || request["pass"].ToString() != "l0st4nge1s")
279 {
280 responsedata["int_response_code"] = response_code;
281 responsedata["content_type"] = "text/plain";
282 responsedata["keepalive"] = false;
283 responsedata["str_response_string"] = "Access denied";
284 responsedata["access_control_allow_origin"] = "*";
285
286 return responsedata;
287 }
288
278 if (request.ContainsKey("cat")) pCategoryName = request["cat"].ToString(); 289 if (request.ContainsKey("cat")) pCategoryName = request["cat"].ToString();
279 if (request.ContainsKey("cont")) pContainerName = request["cat"].ToString(); 290 if (request.ContainsKey("cont")) pContainerName = request["cat"].ToString();
280 if (request.ContainsKey("stat")) pStatName = request["cat"].ToString(); 291 if (request.ContainsKey("stat")) pStatName = request["cat"].ToString();
@@ -524,4 +535,4 @@ namespace OpenSim.Framework.Monitoring
524 Debug, 535 Debug,
525 Info 536 Info
526 } 537 }
527} \ No newline at end of file 538}