aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Grid
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Server/Handlers/Grid
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Server/Handlers/Grid')
-rw-r--r--OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs10
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs20
2 files changed, 15 insertions, 15 deletions
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
83 { 83 {
84 _info["login"] 84 _info["login"]
85 = String.Format( 85 = String.Format(
86 "http://127.0.0.1:{0}/", 86 "http://127.0.0.1:{0}/",
87 netCfg.GetString( 87 netCfg.GetString(
88 "http_listener_port", ConfigSettings.DefaultRegionHttpPort.ToString())); 88 "http_listener_port", ConfigSettings.DefaultRegionHttpPort.ToString()));
89 89
90 IssueWarning(); 90 IssueWarning();
91 } 91 }
92 else 92 else
@@ -99,7 +99,7 @@ namespace OpenSim.Server.Handlers.Grid
99 { 99 {
100 _log.Warn("[GRID INFO SERVICE]: Cannot get grid info from config source, using minimal defaults"); 100 _log.Warn("[GRID INFO SERVICE]: Cannot get grid info from config source, using minimal defaults");
101 } 101 }
102 102
103 _log.DebugFormat("[GRID INFO SERVICE]: Grid info service initialized with {0} keys", _info.Count); 103 _log.DebugFormat("[GRID INFO SERVICE]: Grid info service initialized with {0} keys", _info.Count);
104 } 104 }
105 105
@@ -107,7 +107,7 @@ namespace OpenSim.Server.Handlers.Grid
107 { 107 {
108 _log.Warn("[GRID INFO SERVICE]: found no [GridInfo] section in your configuration files"); 108 _log.Warn("[GRID INFO SERVICE]: found no [GridInfo] section in your configuration files");
109 _log.Warn("[GRID INFO SERVICE]: trying to guess sensible defaults, you might want to provide better ones:"); 109 _log.Warn("[GRID INFO SERVICE]: trying to guess sensible defaults, you might want to provide better ones:");
110 110
111 foreach (string k in _info.Keys) 111 foreach (string k in _info.Keys)
112 { 112 {
113 _log.WarnFormat("[GRID INFO SERVICE]: {0}: {1}", k, _info[k]); 113 _log.WarnFormat("[GRID INFO SERVICE]: {0}: {1}", k, _info[k]);
@@ -181,7 +181,7 @@ namespace OpenSim.Server.Handlers.Grid
181 new string[] { "Startup", "Hypergrid" }, String.Empty); 181 new string[] { "Startup", "Hypergrid" }, String.Empty);
182 182
183 if (!String.IsNullOrEmpty(HomeURI)) 183 if (!String.IsNullOrEmpty(HomeURI))
184 map["home"] = OSD.FromString(HomeURI); 184 map["home"] = OSD.FromString(HomeURI);
185 else // Legacy. Remove soon! 185 else // Legacy. Remove soon!
186 { 186 {
187 IConfig cfg = m_Config.Configs["LoginService"]; 187 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
65 protected override byte[] ProcessRequest(string path, Stream requestData, 65 protected override byte[] ProcessRequest(string path, Stream requestData,
66 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 66 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
67 { 67 {
68 StreamReader sr = new StreamReader(requestData); 68 string body;
69 string body = sr.ReadToEnd(); 69 using(StreamReader sr = new StreamReader(requestData))
70 sr.Close(); 70 body = sr.ReadToEnd();
71 body = body.Trim(); 71 body = body.Trim();
72 72
73 //m_log.DebugFormat("[XXX]: query String: {0}", body); 73 //m_log.DebugFormat("[XXX]: query String: {0}", body);
@@ -126,7 +126,7 @@ namespace OpenSim.Server.Handlers.Grid
126 case "get_grid_extra_features": 126 case "get_grid_extra_features":
127 return GetGridExtraFeatures(request); 127 return GetGridExtraFeatures(request);
128 } 128 }
129 129
130 m_log.DebugFormat("[GRID HANDLER]: unknown method request {0}", method); 130 m_log.DebugFormat("[GRID HANDLER]: unknown method request {0}", method);
131 } 131 }
132 catch (Exception e) 132 catch (Exception e)
@@ -579,33 +579,33 @@ namespace OpenSim.Server.Handlers.Grid
579 if (request.ContainsKey("SCOPEID")) 579 if (request.ContainsKey("SCOPEID"))
580 UUID.TryParse(request["SCOPEID"].ToString(), out scopeID); 580 UUID.TryParse(request["SCOPEID"].ToString(), out scopeID);
581 else 581 else
582 m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get neighbours"); 582 m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get RegionFlags");
583 583
584 UUID regionID = UUID.Zero; 584 UUID regionID = UUID.Zero;
585 if (request.ContainsKey("REGIONID")) 585 if (request.ContainsKey("REGIONID"))
586 UUID.TryParse(request["REGIONID"].ToString(), out regionID); 586 UUID.TryParse(request["REGIONID"].ToString(), out regionID);
587 else 587 else
588 m_log.WarnFormat("[GRID HANDLER]: no regionID in request to get neighbours"); 588 m_log.WarnFormat("[GRID HANDLER]: no regionID in request to get RegionFlags");
589 589
590 int flags = m_GridService.GetRegionFlags(scopeID, regionID); 590 int flags = m_GridService.GetRegionFlags(scopeID, regionID);
591 // m_log.DebugFormat("[GRID HANDLER]: flags for region {0}: {1}", regionID, flags); 591 // m_log.DebugFormat("[GRID HANDLER]: flags for region {0}: {1}", regionID, flags);
592 592
593 Dictionary<string, object> result = new Dictionary<string, object>(); 593 Dictionary<string, object> result = new Dictionary<string, object>();
594 result["result"] = flags.ToString(); 594 result["result"] = flags.ToString();
595 595
596 string xmlString = ServerUtils.BuildXmlResponse(result); 596 string xmlString = ServerUtils.BuildXmlResponse(result);
597 597
598 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); 598 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
599 return Util.UTF8NoBomEncoding.GetBytes(xmlString); 599 return Util.UTF8NoBomEncoding.GetBytes(xmlString);
600 } 600 }
601 601
602 byte[] GetGridExtraFeatures(Dictionary<string, object> request) 602 byte[] GetGridExtraFeatures(Dictionary<string, object> request)
603 { 603 {
604 604
605 Dictionary<string, object> result = new Dictionary<string, object> (); 605 Dictionary<string, object> result = new Dictionary<string, object> ();
606 Dictionary<string, object> extraFeatures = m_GridService.GetExtraFeatures (); 606 Dictionary<string, object> extraFeatures = m_GridService.GetExtraFeatures ();
607 607
608 foreach (string key in extraFeatures.Keys) 608 foreach (string key in extraFeatures.Keys)
609 { 609 {
610 result [key] = extraFeatures [key]; 610 result [key] = extraFeatures [key];
611 } 611 }