From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs | 10 +++++----- .../Server/Handlers/Grid/GridServerPostHandler.cs | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'OpenSim/Server/Handlers/Grid') diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs index 346af32..2aec045 100644 --- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs +++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs @@ -83,10 +83,10 @@ namespace OpenSim.Server.Handlers.Grid { _info["login"] = String.Format( - "http://127.0.0.1:{0}/", + "http://127.0.0.1:{0}/", netCfg.GetString( "http_listener_port", ConfigSettings.DefaultRegionHttpPort.ToString())); - + IssueWarning(); } else @@ -99,7 +99,7 @@ namespace OpenSim.Server.Handlers.Grid { _log.Warn("[GRID INFO SERVICE]: Cannot get grid info from config source, using minimal defaults"); } - + _log.DebugFormat("[GRID INFO SERVICE]: Grid info service initialized with {0} keys", _info.Count); } @@ -107,7 +107,7 @@ namespace OpenSim.Server.Handlers.Grid { _log.Warn("[GRID INFO SERVICE]: found no [GridInfo] section in your configuration files"); _log.Warn("[GRID INFO SERVICE]: trying to guess sensible defaults, you might want to provide better ones:"); - + foreach (string k in _info.Keys) { _log.WarnFormat("[GRID INFO SERVICE]: {0}: {1}", k, _info[k]); @@ -181,7 +181,7 @@ namespace OpenSim.Server.Handlers.Grid new string[] { "Startup", "Hypergrid" }, String.Empty); if (!String.IsNullOrEmpty(HomeURI)) - map["home"] = OSD.FromString(HomeURI); + map["home"] = OSD.FromString(HomeURI); else // Legacy. Remove soon! { IConfig cfg = m_Config.Configs["LoginService"]; diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index 86fda36..44d4654 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -65,9 +65,9 @@ namespace OpenSim.Server.Handlers.Grid protected override byte[] ProcessRequest(string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { - StreamReader sr = new StreamReader(requestData); - string body = sr.ReadToEnd(); - sr.Close(); + string body; + using(StreamReader sr = new StreamReader(requestData)) + body = sr.ReadToEnd(); body = body.Trim(); //m_log.DebugFormat("[XXX]: query String: {0}", body); @@ -126,7 +126,7 @@ namespace OpenSim.Server.Handlers.Grid case "get_grid_extra_features": return GetGridExtraFeatures(request); } - + m_log.DebugFormat("[GRID HANDLER]: unknown method request {0}", method); } catch (Exception e) @@ -579,33 +579,33 @@ namespace OpenSim.Server.Handlers.Grid if (request.ContainsKey("SCOPEID")) UUID.TryParse(request["SCOPEID"].ToString(), out scopeID); else - m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get neighbours"); + m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get RegionFlags"); 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"); + m_log.WarnFormat("[GRID HANDLER]: no regionID in request to get RegionFlags"); int flags = m_GridService.GetRegionFlags(scopeID, regionID); // m_log.DebugFormat("[GRID HANDLER]: flags for region {0}: {1}", regionID, flags); - Dictionary result = new Dictionary(); + Dictionary result = new Dictionary(); result["result"] = flags.ToString(); string xmlString = ServerUtils.BuildXmlResponse(result); - + //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); return Util.UTF8NoBomEncoding.GetBytes(xmlString); } - + byte[] GetGridExtraFeatures(Dictionary request) { Dictionary result = new Dictionary (); Dictionary extraFeatures = m_GridService.GetExtraFeatures (); - foreach (string key in extraFeatures.Keys) + foreach (string key in extraFeatures.Keys) { result [key] = extraFeatures [key]; } -- cgit v1.1