Added simulation version compatibility check so that agents coming from 0.7.6 to a varregion running in 0.8 and above will be denied teleport, rather than be allowed and crash the viewer.

This commit is contained in:
Diva Canto
2014-06-06 11:04:53 -07:00
committed by Justin Clark-Casey
parent 72456f90a4
commit ffe07527fc
10 changed files with 67 additions and 23 deletions

View File

@@ -282,7 +282,7 @@ namespace OpenSim.Services.Connectors.Simulation
}
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, out string version, out string reason)
{
reason = "Failed to contact destination";
version = "Unknown";
@@ -298,6 +298,7 @@ namespace OpenSim.Services.Connectors.Simulation
OSDMap request = new OSDMap();
request.Add("viaTeleport", OSD.FromBoolean(viaTeleport));
request.Add("position", OSD.FromString(position.ToString()));
request.Add("my_version", OSD.FromString(myversion));
if (agentHomeURI != null)
request.Add("agent_home_uri", OSD.FromString(agentHomeURI));