diff options
author | Marck | 2010-08-06 07:46:19 +0200 |
---|---|---|
committer | Diva Canto | 2010-08-06 17:02:03 -0700 |
commit | 7e47ab746ef588648b8edbbc7cfb48c4d90c5e34 (patch) | |
tree | 0ba450dffb35724504634f88cc21b9c59a983130 /OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | |
parent | Remove old test classes that don't actually test anything not done elsewhere (diff) | |
download | opensim-SC-7e47ab746ef588648b8edbbc7cfb48c4d90c5e34.zip opensim-SC-7e47ab746ef588648b8edbbc7cfb48c4d90c5e34.tar.gz opensim-SC-7e47ab746ef588648b8edbbc7cfb48c4d90c5e34.tar.bz2 opensim-SC-7e47ab746ef588648b8edbbc7cfb48c4d90c5e34.tar.xz |
Allow creation of link regions if there is an existing region within a 4096 range.
Also add GetHyperlinks() to the grid service.
Diffstat (limited to 'OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index c90dd6f..913c6c9 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | |||
@@ -109,6 +109,9 @@ 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_hyperlinks": | ||
113 | return GetHyperlinks(request); | ||
114 | |||
112 | case "get_region_flags": | 115 | case "get_region_flags": |
113 | return GetRegionFlags(request); | 116 | return GetRegionFlags(request); |
114 | } | 117 | } |
@@ -483,6 +486,36 @@ namespace OpenSim.Server.Handlers.Grid | |||
483 | return encoding.GetBytes(xmlString); | 486 | return encoding.GetBytes(xmlString); |
484 | } | 487 | } |
485 | 488 | ||
489 | byte[] GetHyperlinks(Dictionary<string, object> request) | ||
490 | { | ||
491 | //m_log.DebugFormat("[GRID HANDLER]: GetHyperlinks"); | ||
492 | UUID scopeID = UUID.Zero; | ||
493 | if (request.ContainsKey("SCOPEID")) | ||
494 | UUID.TryParse(request["SCOPEID"].ToString(), out scopeID); | ||
495 | else | ||
496 | m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get linked regions"); | ||
497 | |||
498 | List<GridRegion> rinfos = m_GridService.GetHyperlinks(scopeID); | ||
499 | |||
500 | Dictionary<string, object> result = new Dictionary<string, object>(); | ||
501 | if ((rinfos == null) || ((rinfos != null) && (rinfos.Count == 0))) | ||
502 | result["result"] = "null"; | ||
503 | else | ||
504 | { | ||
505 | int i = 0; | ||
506 | foreach (GridRegion rinfo in rinfos) | ||
507 | { | ||
508 | Dictionary<string, object> rinfoDict = rinfo.ToKeyValuePairs(); | ||
509 | result["region" + i] = rinfoDict; | ||
510 | i++; | ||
511 | } | ||
512 | } | ||
513 | string xmlString = ServerUtils.BuildXmlResponse(result); | ||
514 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | ||
515 | UTF8Encoding encoding = new UTF8Encoding(); | ||
516 | return encoding.GetBytes(xmlString); | ||
517 | } | ||
518 | |||
486 | byte[] GetRegionFlags(Dictionary<string, object> request) | 519 | byte[] GetRegionFlags(Dictionary<string, object> request) |
487 | { | 520 | { |
488 | UUID scopeID = UUID.Zero; | 521 | UUID scopeID = UUID.Zero; |