Allow older teleport ConnectorProtocolVersion of "SIMULATION/0.1" to be manually forced in a new [SimulationService] config setting.

This is for testing and debugging purposes to help determine whether a particular issue may be teleport related or not
"SIMULATION/0.2" (the newer teleport protocol) remains the default.  If the source simulator only implements "SIMULATION/0.1" this will correctly allow fallback to the older protocol.
Specifying "SIMULATION/0.1" will force the older, less efficient protocol to always be used.
TeleportWork
Justin Clark-Casey (justincc) 2013-08-02 23:12:54 +01:00
parent d4c506e453
commit 54b1071556
4 changed files with 49 additions and 27 deletions

View File

@ -63,35 +63,40 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
/// </summary>
private bool m_ModuleEnabled = false;
public LocalSimulationConnectorModule()
{
ServiceVersion = "SIMULATION/0.2";
}
#region Region Module interface
public void Initialise(IConfigSource config)
public void Initialise(IConfigSource configSource)
{
IConfig moduleConfig = config.Configs["Modules"];
IConfig moduleConfig = configSource.Configs["Modules"];
if (moduleConfig != null)
{
string name = moduleConfig.GetString("SimulationServices", "");
if (name == Name)
{
//IConfig userConfig = config.Configs["SimulationService"];
//if (userConfig == null)
//{
// m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
// return;
//}
InitialiseService(configSource);
m_ModuleEnabled = true;
m_log.Info("[SIMULATION CONNECTOR]: Local simulation enabled");
m_log.Info("[LOCAL SIMULATION CONNECTOR]: Local simulation enabled.");
}
}
}
public void InitialiseService(IConfigSource configSource)
{
IConfig config = configSource.Configs["SimulationService"];
if (config != null)
{
ServiceVersion = config.GetString("ConnectorProtocolVersion", "SIMULATION/0.2");
if (ServiceVersion != "SIMULATION/0.1" && ServiceVersion != "SIMULATION/0.2")
throw new Exception(string.Format("Invalid ConnectorProtocolVersion {0}", ServiceVersion));
m_log.InfoFormat(
"[LOCAL SIMULATION CONNECTOR]: Initialzied with connector protocol version {0}", ServiceVersion);
}
}
public void PostInitialise()
{
}

View File

@ -50,9 +50,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteSimulationConnectorModule")]
public class RemoteSimulationConnectorModule : ISharedRegionModule, ISimulationService
{
private bool initialized = false;
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private bool initialized = false;
protected bool m_enabled = false;
protected Scene m_aScene;
// RemoteSimulationConnector does not care about local regions; it delegates that to the Local module
@ -64,27 +64,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
#region Region Module interface
public virtual void Initialise(IConfigSource config)
public virtual void Initialise(IConfigSource configSource)
{
IConfig moduleConfig = config.Configs["Modules"];
IConfig moduleConfig = configSource.Configs["Modules"];
if (moduleConfig != null)
{
string name = moduleConfig.GetString("SimulationServices", "");
if (name == Name)
{
//IConfig userConfig = config.Configs["SimulationService"];
//if (userConfig == null)
//{
// m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
// return;
//}
m_localBackend = new LocalSimulationConnectorModule();
m_localBackend.InitialiseService(configSource);
m_remoteConnector = new SimulationServiceConnector();
m_enabled = true;
m_log.Info("[SIMULATION CONNECTOR]: Remote simulation enabled");
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Remote simulation enabled.");
}
}
}
@ -143,7 +139,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
protected virtual void InitOnce(Scene scene)
{
m_localBackend = new LocalSimulationConnectorModule();
m_aScene = scene;
//m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService);
m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName);

View File

@ -30,6 +30,17 @@
SimulationServiceInConnector = true
LibraryModule = 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.2"
; - this is the default. 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.2"
[SimulationDataStore]
LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"

View File

@ -26,6 +26,17 @@
GridInfoServiceInConnector = 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.2"
; - this is the default. 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.2"
[SimulationDataStore]
LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"