From 0c81966c0a8f69474fb542d7b4df1780ef756519 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 29 Jan 2010 09:12:22 -0800 Subject: Works for grid login. --- .../Server/Handlers/Grid/GridServerPostHandler.cs | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index 318ce85..c90dd6f 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -109,6 +109,8 @@ namespace OpenSim.Server.Handlers.Grid case "get_fallback_regions": return GetFallbackRegions(request); + case "get_region_flags": + return GetRegionFlags(request); } m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method); } @@ -481,6 +483,33 @@ namespace OpenSim.Server.Handlers.Grid return encoding.GetBytes(xmlString); } + byte[] GetRegionFlags(Dictionary request) + { + UUID scopeID = UUID.Zero; + if (request.ContainsKey("SCOPEID")) + UUID.TryParse(request["SCOPEID"].ToString(), out scopeID); + else + m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get neighbours"); + + UUID regionID = UUID.Zero; + if (request.ContainsKey("REGIONID")) + UUID.TryParse(request["REGIONID"].ToString(), out regionID); + else + m_log.WarnFormat("[GRID HANDLER]: no regionID in request to get neighbours"); + + int flags = m_GridService.GetRegionFlags(scopeID, regionID); + // m_log.DebugFormat("[GRID HANDLER]: flags for region {0}: {1}", regionID, flags); + + Dictionary result = new Dictionary(); + result["result"] = flags.ToString(); + + string xmlString = ServerUtils.BuildXmlResponse(result); + //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); + UTF8Encoding encoding = new UTF8Encoding(); + return encoding.GetBytes(xmlString); + } + + #endregion #region Misc -- cgit v1.1