aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs15
1 files changed, 4 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 3800b3f..32ac992 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -81,8 +81,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
81 81
82 public void InitialiseService(IConfigSource configSource) 82 public void InitialiseService(IConfigSource configSource)
83 { 83 {
84 ServiceVersion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
85 m_log.InfoFormat("[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
86 } 84 }
87 85
88 public void PostInitialise() 86 public void PostInitialise()
@@ -251,10 +249,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
251 return true; 249 return true;
252 } 250 }
253 251
254 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string theirversion, List<UUID> features, out string version, out string reason) 252 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, out float version, out string reason)
255 { 253 {
256 reason = "Communications failure"; 254 reason = "Communications failure";
257 version = ServiceVersion; 255 version = VersionInfo.SimulationServiceVersionAcceptedMax; // If it's within the process, use max. If it's not, the connector will overwrite this
258 if (destination == null) 256 if (destination == null)
259 return false; 257 return false;
260 258
@@ -265,17 +263,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
265// s.RegionInfo.RegionName, destination.RegionHandle); 263// s.RegionInfo.RegionName, destination.RegionHandle);
266 uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX; 264 uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX;
267 265
268 float theirVersionNumber = 0f;
269 string[] versionComponents = theirversion.Split(new char[] { '/' });
270 if (versionComponents.Length >= 2)
271 float.TryParse(versionComponents[1], out theirVersionNumber);
272
273 // Var regions here, and the requesting simulator is in an older version. 266 // Var regions here, and the requesting simulator is in an older version.
274 // We will forbide this, because it crashes the viewers 267 // We will forbide this, because it crashes the viewers
275 if (theirVersionNumber < 0.3f && size > 256) 268 if (version < 0.3f && size != 256)
276 { 269 {
277 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; 270 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
278 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber); 271 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied");
279 return false; 272 return false;
280 273
281 } 274 }