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

@@ -144,12 +144,16 @@ namespace OpenSim.Server.Handlers.Simulation
if (args.ContainsKey("agent_home_uri"))
agentHomeURI = args["agent_home_uri"].AsString();
string theirVersion = string.Empty;
if (args.ContainsKey("my_version"))
theirVersion = args["my_version"].AsString();
GridRegion destination = new GridRegion();
destination.RegionID = regionID;
string reason;
string version;
bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason);
bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, theirVersion, out version, out reason);
responsedata["int_response_code"] = HttpStatusCode.OK;