From fe779128b0c50f44cf479444444754298d829910 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 6 Jun 2014 11:04:53 -0700
Subject: 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.
---
OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 3 ++-
OpenSim/Services/Interfaces/ISimulationService.cs | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 099ba98..b6fde72 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -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));
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 8b87ac0..12ab478 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -85,10 +85,11 @@ namespace OpenSim.Services.Interfaces
/// The visitor's Home URI. Will be missing (null) in older OpenSims.
/// True: via teleport; False: via cross (walking)
/// Position in the region
- ///
+ /// version that the requesting simulator is runing
+ /// version that the target simulator is running
/// [out] Optional error message
/// True: ok; False: not allowed
- bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason);
+ bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, out string version, out string reason);
///
/// Message from receiving region to departing region, telling it got contacted by the client.
--
cgit v1.1