mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
This commit is contained in:
@@ -109,6 +109,9 @@ namespace OpenSim.Server.Handlers.Grid
|
||||
case "get_fallback_regions":
|
||||
return GetFallbackRegions(request);
|
||||
|
||||
case "get_hyperlinks":
|
||||
return GetHyperlinks(request);
|
||||
|
||||
case "get_region_flags":
|
||||
return GetRegionFlags(request);
|
||||
}
|
||||
@@ -483,6 +486,36 @@ namespace OpenSim.Server.Handlers.Grid
|
||||
return encoding.GetBytes(xmlString);
|
||||
}
|
||||
|
||||
byte[] GetHyperlinks(Dictionary<string, object> request)
|
||||
{
|
||||
//m_log.DebugFormat("[GRID HANDLER]: GetHyperlinks");
|
||||
UUID scopeID = UUID.Zero;
|
||||
if (request.ContainsKey("SCOPEID"))
|
||||
UUID.TryParse(request["SCOPEID"].ToString(), out scopeID);
|
||||
else
|
||||
m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get linked regions");
|
||||
|
||||
List<GridRegion> rinfos = m_GridService.GetHyperlinks(scopeID);
|
||||
|
||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
if ((rinfos == null) || ((rinfos != null) && (rinfos.Count == 0)))
|
||||
result["result"] = "null";
|
||||
else
|
||||
{
|
||||
int i = 0;
|
||||
foreach (GridRegion rinfo in rinfos)
|
||||
{
|
||||
Dictionary<string, object> rinfoDict = rinfo.ToKeyValuePairs();
|
||||
result["region" + i] = rinfoDict;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||
//m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
|
||||
UTF8Encoding encoding = new UTF8Encoding();
|
||||
return encoding.GetBytes(xmlString);
|
||||
}
|
||||
|
||||
byte[] GetRegionFlags(Dictionary<string, object> request)
|
||||
{
|
||||
UUID scopeID = UUID.Zero;
|
||||
|
||||
Reference in New Issue
Block a user