From 7ab633461ed65d1080b569532020379a068352b5 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 18 Oct 2015 16:06:31 -0700
Subject: Fixed merge conflicts Clean up of simulation version, the number that
rules the compatibility of teleports: - It's not configurable anymore, it's
fixed in code. Each number means an increase in features of the teleport
procedure - Its definition moved to the global VersionInfo class As of now
it's still 0.3.
Conflicts:
OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
---
.../EntityTransfer/EntityTransferModule.cs | 47 ++++------------------
.../Simulation/LocalSimulationConnector.cs | 22 +---------
2 files changed, 9 insertions(+), 60 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index a43b823..9be6d45 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -57,12 +57,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
public const int DefaultMaxTransferDistance = 4095;
public const bool WaitForAgentArrivedAtDestinationDefault = true;
- private string OutgoingTransferVersionName { get; set; }
+ public static readonly string OutgoingTransferVersionName = "SIMULATION";
///
- /// Determine the maximum entity transfer version we will use for teleports.
+ /// Determine the entity transfer version we will use for teleports.
///
- private float MaxOutgoingTransferVersion { get; set; }
+ public static readonly float OutgoingTransferVersion = VersionInfo.SimulationServiceVersion;
private string m_myVersion = "";
///
@@ -215,9 +215,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
///
protected virtual void InitialiseCommon(IConfigSource source)
{
- string transferVersionName = "SIMULATION";
- float maxTransferVersion = 0.3f;
-
IConfig hypergridConfig = source.Configs["Hypergrid"];
if (hypergridConfig != null)
{
@@ -233,33 +230,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
IConfig transferConfig = source.Configs["EntityTransfer"];
if (transferConfig != null)
{
- string rawVersion
- = transferConfig.GetString(
- "MaxOutgoingTransferVersion",
- string.Format("{0}/{1}", transferVersionName, maxTransferVersion));
-
- string[] rawVersionComponents = rawVersion.Split(new char[] { '/' });
-
- bool versionValid = false;
-
- if (rawVersionComponents.Length >= 2)
- versionValid = float.TryParse(rawVersionComponents[1], out maxTransferVersion);
-
- if (!versionValid)
- {
- m_log.ErrorFormat(
- "[ENTITY TRANSFER MODULE]: MaxOutgoingTransferVersion {0} is invalid, using {1}",
- rawVersion, string.Format("{0}/{1}", transferVersionName, maxTransferVersion));
- }
- else
- {
- transferVersionName = rawVersionComponents[0];
-
- m_log.InfoFormat(
- "[ENTITY TRANSFER MODULE]: MaxOutgoingTransferVersion set to {0}",
- string.Format("{0}/{1}", transferVersionName, maxTransferVersion));
- }
-
DisableInterRegionTeleportCancellation
= transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false);
@@ -273,10 +243,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
MaxTransferDistance = DefaultMaxTransferDistance;
}
- OutgoingTransferVersionName = transferVersionName;
- MaxOutgoingTransferVersion = maxTransferVersion;
-
- m_myVersion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
+ m_myVersion = string.Format("{0}/{1}", OutgoingTransferVersionName, OutgoingTransferVersion);
m_entityTransferStateMachine = new EntityTransferStateMachine(this);
@@ -789,8 +756,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_interRegionTeleportAttempts.Value++;
m_log.DebugFormat(
- "[ENTITY TRANSFER MODULE]: {0} max transfer version is {1}/{2}, {3} max version is {4}",
- sp.Scene.Name, OutgoingTransferVersionName, MaxOutgoingTransferVersion, finalDestination.RegionName, version);
+ "[ENTITY TRANSFER MODULE]: {0} transfer version is {1}/{2}, {3} version is {4}",
+ sp.Scene.Name, OutgoingTransferVersionName, OutgoingTransferVersion, finalDestination.RegionName, version);
// Fixing a bug where teleporting while sitting results in the avatar ending up removed from
// both regions
@@ -877,7 +844,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (versionComponents.Length >= 2)
float.TryParse(versionComponents[1], out versionNumber);
- if (versionNumber >= 0.2f && MaxOutgoingTransferVersion >= versionNumber)
+ if (versionNumber >= 0.2f)
TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , version, out reason);
else
TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, version, out reason);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 9d4c282..de0ae4c 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -48,11 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
///
/// Version of this service.
///
- ///
- /// Currently valid versions are "SIMULATION/0.1" and "SIMULATION/0.2"
- ///
public string ServiceVersion { get; set; }
- private float m_VersionNumber = 0.3f;
///
/// Map region ID to scene.
@@ -85,22 +81,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public void InitialiseService(IConfigSource configSource)
{
- ServiceVersion = "SIMULATION/0.3";
- IConfig config = configSource.Configs["SimulationService"];
- if (config != null)
- {
- ServiceVersion = config.GetString("ConnectorProtocolVersion", ServiceVersion);
-
- if (ServiceVersion != "SIMULATION/0.1" && ServiceVersion != "SIMULATION/0.2" && ServiceVersion != "SIMULATION/0.3")
- throw new Exception(string.Format("Invalid ConnectorProtocolVersion {0}", ServiceVersion));
-
- string[] versionComponents = ServiceVersion.Split(new char[] { '/' });
- if (versionComponents.Length >= 2)
- float.TryParse(versionComponents[1], out m_VersionNumber);
-
- m_log.InfoFormat(
- "[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
- }
+ ServiceVersion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
+ m_log.InfoFormat("[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
}
public void PostInitialise()
--
cgit v1.1