aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
diff options
context:
space:
mode:
authorDiva Canto2010-01-29 09:12:22 -0800
committerDiva Canto2010-01-29 09:12:22 -0800
commit0c81966c0a8f69474fb542d7b4df1780ef756519 (patch)
tree549973fd8c11ee8dd3eba939eb0605a28c6d2849 /OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
parentFixed broken dll name. (diff)
downloadopensim-SC-0c81966c0a8f69474fb542d7b4df1780ef756519.zip
opensim-SC-0c81966c0a8f69474fb542d7b4df1780ef756519.tar.gz
opensim-SC-0c81966c0a8f69474fb542d7b4df1780ef756519.tar.bz2
opensim-SC-0c81966c0a8f69474fb542d7b4df1780ef756519.tar.xz
Works for grid login.
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs29
1 files changed, 29 insertions, 0 deletions
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
109 case "get_fallback_regions": 109 case "get_fallback_regions":
110 return GetFallbackRegions(request); 110 return GetFallbackRegions(request);
111 111
112 case "get_region_flags":
113 return GetRegionFlags(request);
112 } 114 }
113 m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method); 115 m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method);
114 } 116 }
@@ -481,6 +483,33 @@ namespace OpenSim.Server.Handlers.Grid
481 return encoding.GetBytes(xmlString); 483 return encoding.GetBytes(xmlString);
482 } 484 }
483 485
486 byte[] GetRegionFlags(Dictionary<string, object> request)
487 {
488 UUID scopeID = UUID.Zero;
489 if (request.ContainsKey("SCOPEID"))
490 UUID.TryParse(request["SCOPEID"].ToString(), out scopeID);
491 else
492 m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get neighbours");
493
494 UUID regionID = UUID.Zero;
495 if (request.ContainsKey("REGIONID"))
496 UUID.TryParse(request["REGIONID"].ToString(), out regionID);
497 else
498 m_log.WarnFormat("[GRID HANDLER]: no regionID in request to get neighbours");
499
500 int flags = m_GridService.GetRegionFlags(scopeID, regionID);
501 // m_log.DebugFormat("[GRID HANDLER]: flags for region {0}: {1}", regionID, flags);
502
503 Dictionary<string, object> result = new Dictionary<string, object>();
504 result["result"] = flags.ToString();
505
506 string xmlString = ServerUtils.BuildXmlResponse(result);
507 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
508 UTF8Encoding encoding = new UTF8Encoding();
509 return encoding.GetBytes(xmlString);
510 }
511
512
484 #endregion 513 #endregion
485 514
486 #region Misc 515 #region Misc