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.0.8.2-post-fixes
parent
339e252cce
commit
70a46fe090
|
@ -873,7 +873,8 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
protected string GetVersionText()
|
protected string GetVersionText()
|
||||||
{
|
{
|
||||||
return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion);
|
return String.Format("Version: {0} (interface version {1}, SIMULATION/{2})",
|
||||||
|
m_version, VersionInfo.MajorInterfaceVersion, VersionInfo.SimulationServiceVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -60,17 +60,26 @@ namespace OpenSim
|
||||||
/// <value>
|
/// <value>
|
||||||
/// This is the external interface version. It is separate from the OpenSimulator project version.
|
/// This is the external interface version. It is separate from the OpenSimulator project version.
|
||||||
///
|
///
|
||||||
/// This version number should be
|
|
||||||
/// increased by 1 every time a code change makes the previous OpenSimulator revision incompatible
|
|
||||||
/// with the new revision. This will usually be due to interregion or grid facing interface changes.
|
|
||||||
///
|
|
||||||
/// Changes which are compatible with an older revision (e.g. older revisions experience degraded functionality
|
|
||||||
/// but not outright failure) do not need a version number increment.
|
|
||||||
///
|
|
||||||
/// Having this version number allows the grid service to reject connections from regions running a version
|
|
||||||
/// of the code that is too old.
|
|
||||||
///
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public readonly static int MajorInterfaceVersion = 8;
|
public readonly static int MajorInterfaceVersion = 8;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This rules versioning regarding teleports, and compatibility between simulators in that regard.
|
||||||
|
/// </summary>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// The protocol version that we will use for outgoing transfers
|
||||||
|
/// Valid values are
|
||||||
|
/// "SIMULATION/0.3"
|
||||||
|
/// - This is the latest, and it supports teleports to variable-sized regions
|
||||||
|
/// - Older versions can teleport to this one, but only if the destination region
|
||||||
|
/// is 256x256
|
||||||
|
/// "SIMULATION/0.2"
|
||||||
|
/// - A source simulator which only implements "SIMULATION/0.1" can still teleport here
|
||||||
|
/// - this protocol is more efficient than "SIMULATION/0.1"
|
||||||
|
/// "SIMULATION/0.1"
|
||||||
|
/// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
||||||
|
/// </remarks>
|
||||||
|
public readonly static float SimulationServiceVersion = 0.3f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,12 +57,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
public const int DefaultMaxTransferDistance = 4095;
|
public const int DefaultMaxTransferDistance = 4095;
|
||||||
public const bool WaitForAgentArrivedAtDestinationDefault = true;
|
public const bool WaitForAgentArrivedAtDestinationDefault = true;
|
||||||
|
|
||||||
public string OutgoingTransferVersionName { get; set; }
|
public static readonly string OutgoingTransferVersionName = "SIMULATION";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determine the maximum entity transfer version we will use for teleports.
|
/// Determine the entity transfer version we will use for teleports.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float MaxOutgoingTransferVersion { get; set; }
|
public static readonly float OutgoingTransferVersion = VersionInfo.SimulationServiceVersion;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum distance, in standard region units (256m) that an agent is allowed to transfer.
|
/// The maximum distance, in standard region units (256m) that an agent is allowed to transfer.
|
||||||
|
@ -207,9 +207,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
/// <param name="source"></param>
|
/// <param name="source"></param>
|
||||||
protected virtual void InitialiseCommon(IConfigSource source)
|
protected virtual void InitialiseCommon(IConfigSource source)
|
||||||
{
|
{
|
||||||
string transferVersionName = "SIMULATION";
|
|
||||||
float maxTransferVersion = 0.3f;
|
|
||||||
|
|
||||||
IConfig hypergridConfig = source.Configs["Hypergrid"];
|
IConfig hypergridConfig = source.Configs["Hypergrid"];
|
||||||
if (hypergridConfig != null)
|
if (hypergridConfig != null)
|
||||||
{
|
{
|
||||||
|
@ -225,33 +222,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
IConfig transferConfig = source.Configs["EntityTransfer"];
|
IConfig transferConfig = source.Configs["EntityTransfer"];
|
||||||
if (transferConfig != null)
|
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
|
DisableInterRegionTeleportCancellation
|
||||||
= transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false);
|
= transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false);
|
||||||
|
|
||||||
|
@ -265,9 +235,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
MaxTransferDistance = DefaultMaxTransferDistance;
|
MaxTransferDistance = DefaultMaxTransferDistance;
|
||||||
}
|
}
|
||||||
|
|
||||||
OutgoingTransferVersionName = transferVersionName;
|
|
||||||
MaxOutgoingTransferVersion = maxTransferVersion;
|
|
||||||
|
|
||||||
m_entityTransferStateMachine = new EntityTransferStateMachine(this);
|
m_entityTransferStateMachine = new EntityTransferStateMachine(this);
|
||||||
|
|
||||||
m_Enabled = true;
|
m_Enabled = true;
|
||||||
|
@ -760,7 +727,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
string reason;
|
string reason;
|
||||||
string version;
|
string version;
|
||||||
string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
|
string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, OutgoingTransferVersion);
|
||||||
if (!Scene.SimulationService.QueryAccess(
|
if (!Scene.SimulationService.QueryAccess(
|
||||||
finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, myversion, sp.Scene.GetFormatsOffered(), out version, out reason))
|
finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, myversion, sp.Scene.GetFormatsOffered(), out version, out reason))
|
||||||
{
|
{
|
||||||
|
@ -779,8 +746,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
m_interRegionTeleportAttempts.Value++;
|
m_interRegionTeleportAttempts.Value++;
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[ENTITY TRANSFER MODULE]: {0} max transfer version is {1}/{2}, {3} max version is {4}",
|
"[ENTITY TRANSFER MODULE]: {0} transfer version is {1}/{2}, {3} version is {4}",
|
||||||
sp.Scene.Name, OutgoingTransferVersionName, MaxOutgoingTransferVersion, finalDestination.RegionName, version);
|
sp.Scene.Name, OutgoingTransferVersionName, OutgoingTransferVersion, finalDestination.RegionName, version);
|
||||||
|
|
||||||
// Fixing a bug where teleporting while sitting results in the avatar ending up removed from
|
// Fixing a bug where teleporting while sitting results in the avatar ending up removed from
|
||||||
// both regions
|
// both regions
|
||||||
|
@ -835,7 +802,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
if (versionComponents.Length >= 2)
|
if (versionComponents.Length >= 2)
|
||||||
float.TryParse(versionComponents[1], out versionNumber);
|
float.TryParse(versionComponents[1], out versionNumber);
|
||||||
|
|
||||||
if (versionNumber >= 0.2f && MaxOutgoingTransferVersion >= versionNumber)
|
if (versionNumber >= 0.2f)
|
||||||
TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
||||||
else
|
else
|
||||||
TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
||||||
|
@ -1515,7 +1482,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if we have access to the target region.
|
// Check to see if we have access to the target region.
|
||||||
string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
|
string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, OutgoingTransferVersion);
|
||||||
if (neighbourRegion != null
|
if (neighbourRegion != null
|
||||||
&& !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, myversion, scene.GetFormatsOffered(), out version, out failureReason))
|
&& !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, myversion, scene.GetFormatsOffered(), out version, out failureReason))
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,11 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of this service.
|
/// Version of this service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// Currently valid versions are "SIMULATION/0.1" and "SIMULATION/0.2"
|
|
||||||
/// </remarks>
|
|
||||||
public string ServiceVersion { get; set; }
|
public string ServiceVersion { get; set; }
|
||||||
private float m_VersionNumber = 0.3f;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Map region ID to scene.
|
/// Map region ID to scene.
|
||||||
|
@ -85,22 +81,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||||
|
|
||||||
public void InitialiseService(IConfigSource configSource)
|
public void InitialiseService(IConfigSource configSource)
|
||||||
{
|
{
|
||||||
ServiceVersion = "SIMULATION/0.3";
|
ServiceVersion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
|
||||||
IConfig config = configSource.Configs["SimulationService"];
|
m_log.InfoFormat("[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
|
|
|
@ -454,9 +454,10 @@ namespace OpenSim.Services.HypergridService
|
||||||
|
|
||||||
string version;
|
string version;
|
||||||
|
|
||||||
|
string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
|
||||||
if (!m_SimulationService.QueryAccess(
|
if (!m_SimulationService.QueryAccess(
|
||||||
destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(),
|
destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(),
|
||||||
true, aCircuit.startpos, "SIMULATION/0.3", new List<UUID>(), out version, out reason))
|
true, aCircuit.startpos, myversion, new List<UUID>(), out version, out reason))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason);
|
return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason);
|
||||||
|
|
|
@ -983,11 +983,11 @@ namespace OpenSim.Services.LLLoginService
|
||||||
|
|
||||||
private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason)
|
private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason)
|
||||||
{
|
{
|
||||||
|
string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
|
||||||
string version;
|
string version;
|
||||||
|
|
||||||
if (
|
if (!simConnector.QueryAccess(
|
||||||
!simConnector.QueryAccess(
|
region, aCircuit.AgentID, null, true, aCircuit.startpos, myversion, new List<UUID>(), out version, out reason))
|
||||||
region, aCircuit.AgentID, null, true, aCircuit.startpos, "SIMULATION/0.3", new List<UUID>(), out version, out reason))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason);
|
return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason);
|
||||||
|
|
|
@ -746,21 +746,6 @@
|
||||||
; Distance in meters that shouts should travel. Default is 100m
|
; Distance in meters that shouts should travel. Default is 100m
|
||||||
shout_distance = 100
|
shout_distance = 100
|
||||||
|
|
||||||
|
|
||||||
[EntityTransfer]
|
|
||||||
; The maximum protocol version that we will use for outgoing transfers
|
|
||||||
; Valid values are
|
|
||||||
; "SIMULATION/0.3"
|
|
||||||
; - This is the default, and it supports teleports to variable-sized regions
|
|
||||||
; - Older versions can teleport to this one, but only if the destination region
|
|
||||||
; is 256x256
|
|
||||||
; "SIMULATION/0.2"
|
|
||||||
; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
|
||||||
; - this protocol is more efficient than "SIMULATION/0.1"
|
|
||||||
; "SIMULATION/0.1"
|
|
||||||
; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
|
||||||
MaxOutgoingTransferVersion = "SIMULATION/0.3"
|
|
||||||
|
|
||||||
; The maximum distance in regions that an agent is allowed to teleport
|
; The maximum distance in regions that an agent is allowed to teleport
|
||||||
; along the x or y axis. This is set to 65535 because current viewers
|
; along the x or y axis. This is set to 65535 because current viewers
|
||||||
; can't handle teleports that are greater than this distance
|
; can't handle teleports that are greater than this distance
|
||||||
|
|
|
@ -28,21 +28,6 @@
|
||||||
GridInfoServiceInConnector = true
|
GridInfoServiceInConnector = true
|
||||||
MapImageServiceInConnector = true
|
MapImageServiceInConnector = true
|
||||||
|
|
||||||
[SimulationService]
|
|
||||||
; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport
|
|
||||||
; It is used to control the teleport handoff process.
|
|
||||||
; Valid values are
|
|
||||||
; "SIMULATION/0.3"
|
|
||||||
; - This is the default, and it supports teleports to variable-sized regions
|
|
||||||
; - Older versions can teleport to this one, but only if the destination region
|
|
||||||
; is 256x256
|
|
||||||
; "SIMULATION/0.2"
|
|
||||||
; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
|
||||||
; - this protocol is more efficient than "SIMULATION/0.1"
|
|
||||||
; "SIMULATION/0.1"
|
|
||||||
; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
|
||||||
ConnectorProtocolVersion = "SIMULATION/0.3"
|
|
||||||
|
|
||||||
[SimulationDataStore]
|
[SimulationDataStore]
|
||||||
LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService"
|
LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService"
|
||||||
|
|
||||||
|
|
|
@ -39,21 +39,6 @@
|
||||||
SimulationServiceInConnector = true
|
SimulationServiceInConnector = true
|
||||||
MapImageServiceInConnector = true
|
MapImageServiceInConnector = true
|
||||||
|
|
||||||
[SimulationService]
|
|
||||||
; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport
|
|
||||||
; It is used to control the teleport handoff process.
|
|
||||||
; Valid values are
|
|
||||||
; "SIMULATION/0.3"
|
|
||||||
; - This is the default, and it supports teleports to variable-sized regions
|
|
||||||
; - Older versions can teleport to this one, but only if the destination region
|
|
||||||
; is 256x256
|
|
||||||
; "SIMULATION/0.2"
|
|
||||||
; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
|
||||||
; - this protocol is more efficient than "SIMULATION/0.1"
|
|
||||||
; "SIMULATION/0.1"
|
|
||||||
; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
|
||||||
ConnectorProtocolVersion = "SIMULATION/0.3"
|
|
||||||
|
|
||||||
[Messaging]
|
[Messaging]
|
||||||
MessageTransferModule = HGMessageTransferModule
|
MessageTransferModule = HGMessageTransferModule
|
||||||
LureModule = HGLureModule
|
LureModule = HGLureModule
|
||||||
|
|
Loading…
Reference in New Issue