From b4cb45bb79619306b25c67c770165ab752aeb742 Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Fri, 17 Apr 2009 21:48:48 +0000
Subject: Fixes Mantis # 3469. Thank you kindly, BlueWall, for a patch that:
This patch adds extended status reporting with the url
http://server:port/simstatusx/ [^] . The data is returned in json format as
"text/plain" type.
---
OpenSim/Region/Application/OpenSimBase.cs | 37 ++++++++++++++++++++++
.../Region/ClientStack/LindenUDP/LLClientView.cs | 5 +++
2 files changed, 42 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 7aa9f99..18abcad 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -807,6 +807,43 @@ namespace OpenSim
}
}
+ ///
+ /// Handler to supply the current extended status of this sim
+ ///
+ /// Currently prints the same a "show stats" plus the uptime of the sim
+ public class XSimStatusHandler : IStreamedRequestHandler
+ {
+ OpenSimBase m_opensim;
+
+ public XSimStatusHandler(OpenSimBase sim)
+ // public XSimStatusHandler(BaseOpenSimServer sim)
+ {
+ m_opensim = sim;
+ }
+
+ public byte[] Handle(string path, Stream request,
+ OSHttpRequest httpRequest, OSHttpResponse httpResponse)
+ {
+ return Encoding.UTF8.GetBytes(m_opensim.StatReport());
+ }
+
+ public string ContentType
+ {
+ get { return "text/plain"; }
+ }
+
+ public string HttpMethod
+ {
+ get { return "GET"; }
+ }
+
+ public string Path
+ {
+ get { return "/simstatusx/"; }
+ }
+ }
+
+
#endregion
///
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index ab1816f..6ac0acd 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -10290,5 +10290,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
LLPacketHandler handler = (LLPacketHandler) m_PacketHandler;
return handler.PacketQueue.GetStats();
}
+
+ public string XReport()
+ {
+ return "";
+ }
}
}
--
cgit v1.1