diff options
author | BlueWall | 2012-01-17 21:10:31 -0500 |
---|---|---|
committer | BlueWall | 2012-01-17 21:10:31 -0500 |
commit | 939d60da591b73267bd371c59dc67b78c09ff0be (patch) | |
tree | f0b2c424703dd319fae9793b6dd25749d76b195e /OpenSim/Server/Handlers | |
parent | Allow retrival of multiple user records in one operation, analog to presence (diff) | |
parent | Add json handler for GridInfo (diff) | |
download | opensim-SC_OLD-939d60da591b73267bd371c59dc67b78c09ff0be.zip opensim-SC_OLD-939d60da591b73267bd371c59dc67b78c09ff0be.tar.gz opensim-SC_OLD-939d60da591b73267bd371c59dc67b78c09ff0be.tar.bz2 opensim-SC_OLD-939d60da591b73267bd371c59dc67b78c09ff0be.tar.xz |
Merge branch 'master' of /home/opensim/lib/osgrid/opensim
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs | 15 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs | 2 |
2 files changed, 17 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 | } |
diff --git a/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs b/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs index 8472d34..f9b5915 100644 --- a/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs +++ b/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs | |||
@@ -48,6 +48,8 @@ namespace OpenSim.Server.Handlers.Grid | |||
48 | 48 | ||
49 | server.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", | 49 | server.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", |
50 | handlers.RestGetGridInfoMethod)); | 50 | handlers.RestGetGridInfoMethod)); |
51 | server.AddStreamHandler(new RestStreamHandler("GET", "/json_grid_info", | ||
52 | handlers.JsonGetGridInfoMethod)); | ||
51 | server.AddXmlRPCHandler("get_grid_info", handlers.XmlRpcGridInfoMethod); | 53 | server.AddXmlRPCHandler("get_grid_info", handlers.XmlRpcGridInfoMethod); |
52 | } | 54 | } |
53 | 55 | ||