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
parent
d4c506e453
commit
54b1071556
|
@ -63,35 +63,40 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool m_ModuleEnabled = false;
|
private bool m_ModuleEnabled = false;
|
||||||
|
|
||||||
public LocalSimulationConnectorModule()
|
|
||||||
{
|
|
||||||
ServiceVersion = "SIMULATION/0.2";
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Region Module interface
|
#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)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string name = moduleConfig.GetString("SimulationServices", "");
|
string name = moduleConfig.GetString("SimulationServices", "");
|
||||||
if (name == Name)
|
if (name == Name)
|
||||||
{
|
{
|
||||||
//IConfig userConfig = config.Configs["SimulationService"];
|
InitialiseService(configSource);
|
||||||
//if (userConfig == null)
|
|
||||||
//{
|
|
||||||
// m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
m_ModuleEnabled = true;
|
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()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,9 +50,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteSimulationConnectorModule")]
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteSimulationConnectorModule")]
|
||||||
public class RemoteSimulationConnectorModule : ISharedRegionModule, ISimulationService
|
public class RemoteSimulationConnectorModule : ISharedRegionModule, ISimulationService
|
||||||
{
|
{
|
||||||
private bool initialized = false;
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
private bool initialized = false;
|
||||||
protected bool m_enabled = false;
|
protected bool m_enabled = false;
|
||||||
protected Scene m_aScene;
|
protected Scene m_aScene;
|
||||||
// RemoteSimulationConnector does not care about local regions; it delegates that to the Local module
|
// 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
|
#region Region Module interface
|
||||||
|
|
||||||
public virtual void Initialise(IConfigSource config)
|
public virtual void Initialise(IConfigSource configSource)
|
||||||
{
|
{
|
||||||
|
IConfig moduleConfig = configSource.Configs["Modules"];
|
||||||
IConfig moduleConfig = config.Configs["Modules"];
|
|
||||||
if (moduleConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string name = moduleConfig.GetString("SimulationServices", "");
|
string name = moduleConfig.GetString("SimulationServices", "");
|
||||||
if (name == Name)
|
if (name == Name)
|
||||||
{
|
{
|
||||||
//IConfig userConfig = config.Configs["SimulationService"];
|
m_localBackend = new LocalSimulationConnectorModule();
|
||||||
//if (userConfig == null)
|
|
||||||
//{
|
m_localBackend.InitialiseService(configSource);
|
||||||
// m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
m_remoteConnector = new SimulationServiceConnector();
|
m_remoteConnector = new SimulationServiceConnector();
|
||||||
|
|
||||||
m_enabled = true;
|
m_enabled = true;
|
||||||
|
|
||||||
m_log.Info("[SIMULATION CONNECTOR]: Remote simulation enabled");
|
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Remote simulation enabled.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,8 +138,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void InitOnce(Scene scene)
|
protected virtual void InitOnce(Scene scene)
|
||||||
{
|
{
|
||||||
m_localBackend = new LocalSimulationConnectorModule();
|
|
||||||
m_aScene = scene;
|
m_aScene = scene;
|
||||||
//m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService);
|
//m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService);
|
||||||
m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName);
|
m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName);
|
||||||
|
|
|
@ -30,6 +30,17 @@
|
||||||
SimulationServiceInConnector = true
|
SimulationServiceInConnector = true
|
||||||
LibraryModule = 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]
|
[SimulationDataStore]
|
||||||
LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"
|
LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,17 @@
|
||||||
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.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]
|
[SimulationDataStore]
|
||||||
LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"
|
LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue