diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 20 |
1 files changed, 10 insertions, 10 deletions
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 | } |