diff options
author | BlueWall | 2012-01-17 21:09:46 -0500 |
---|---|---|
committer | BlueWall | 2012-01-17 21:09:46 -0500 |
commit | ef5575be1b7e8122883773c799ddc522ed80c156 (patch) | |
tree | c3f8ab837b456989106e286ca109bc2efeca1946 /OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs | |
parent | protect the region ready alerts for loading oarfiles if no post URI is set (diff) | |
download | opensim-SC_OLD-ef5575be1b7e8122883773c799ddc522ed80c156.zip opensim-SC_OLD-ef5575be1b7e8122883773c799ddc522ed80c156.tar.gz opensim-SC_OLD-ef5575be1b7e8122883773c799ddc522ed80c156.tar.bz2 opensim-SC_OLD-ef5575be1b7e8122883773c799ddc522ed80c156.tar.xz |
Add json handler for GridInfo
Diffstat (limited to 'OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs index 645a77f..bfcddca 100644 --- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs +++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs | |||
@@ -37,6 +37,7 @@ using Nini.Config; | |||
37 | using Nwc.XmlRpc; | 37 | using Nwc.XmlRpc; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Servers.HttpServer; | 39 | using OpenSim.Framework.Servers.HttpServer; |
40 | using OpenMetaverse.StructuredData; | ||
40 | 41 | ||
41 | namespace OpenSim.Server.Handlers.Grid | 42 | namespace OpenSim.Server.Handlers.Grid |
42 | { | 43 | { |
@@ -142,5 +143,19 @@ namespace OpenSim.Server.Handlers.Grid | |||
142 | 143 | ||
143 | return sb.ToString(); | 144 | return sb.ToString(); |
144 | } | 145 | } |
146 | |||
147 | public string JsonGetGridInfoMethod(string request, string path, string param, | ||
148 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | ||
149 | { | ||
150 | |||
151 | OSDMap map = new OSDMap(); | ||
152 | |||
153 | foreach (string k in _info.Keys) | ||
154 | { | ||
155 | map[k] = OSD.FromString(_info[k].ToString()); | ||
156 | } | ||
157 | |||
158 | return OSDParser.SerializeJsonString(map).ToString(); | ||
159 | } | ||
145 | } | 160 | } |
146 | } | 161 | } |