diff options
author | Justin Clark-Casey (justincc) | 2013-08-02 23:12:54 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-08-02 23:12:54 +0100 |
commit | 54b1071556edf264835f990bb3595064d2b2e2f0 (patch) | |
tree | bfa4a7a8e445d070cca956b190ba33a8a6edf21d /OpenSim/Region/CoreModules/ServiceConnectorsOut | |
parent | minor: replace veclist.Add(new Vector3(0,0,0)) with Vector3.Zero in Inventory... (diff) | |
download | opensim-SC_OLD-54b1071556edf264835f990bb3595064d2b2e2f0.zip opensim-SC_OLD-54b1071556edf264835f990bb3595064d2b2e2f0.tar.gz opensim-SC_OLD-54b1071556edf264835f990bb3595064d2b2e2f0.tar.bz2 opensim-SC_OLD-54b1071556edf264835f990bb3595064d2b2e2f0.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | 33 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | 21 |
2 files changed, 27 insertions, 27 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 697ce68..7aadb87 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -63,35 +63,40 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
63 | /// </summary> | 63 | /// </summary> |
64 | private bool m_ModuleEnabled = false; | 64 | private bool m_ModuleEnabled = false; |
65 | 65 | ||
66 | public LocalSimulationConnectorModule() | ||
67 | { | ||
68 | ServiceVersion = "SIMULATION/0.2"; | ||
69 | } | ||
70 | |||
71 | #region Region Module interface | 66 | #region Region Module interface |
72 | 67 | ||
73 | public void Initialise(IConfigSource config) | 68 | public void Initialise(IConfigSource configSource) |
74 | { | 69 | { |
75 | IConfig moduleConfig = config.Configs["Modules"]; | 70 | IConfig moduleConfig = configSource.Configs["Modules"]; |
76 | if (moduleConfig != null) | 71 | if (moduleConfig != null) |
77 | { | 72 | { |
78 | string name = moduleConfig.GetString("SimulationServices", ""); | 73 | string name = moduleConfig.GetString("SimulationServices", ""); |
79 | if (name == Name) | 74 | if (name == Name) |
80 | { | 75 | { |
81 | //IConfig userConfig = config.Configs["SimulationService"]; | 76 | InitialiseService(configSource); |
82 | //if (userConfig == null) | ||
83 | //{ | ||
84 | // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini"); | ||
85 | // return; | ||
86 | //} | ||
87 | 77 | ||
88 | m_ModuleEnabled = true; | 78 | m_ModuleEnabled = true; |
89 | 79 | ||
90 | m_log.Info("[SIMULATION CONNECTOR]: Local simulation enabled"); | 80 | m_log.Info("[LOCAL SIMULATION CONNECTOR]: Local simulation enabled."); |
91 | } | 81 | } |
92 | } | 82 | } |
93 | } | 83 | } |
94 | 84 | ||
85 | public void InitialiseService(IConfigSource configSource) | ||
86 | { | ||
87 | IConfig config = configSource.Configs["SimulationService"]; | ||
88 | if (config != null) | ||
89 | { | ||
90 | ServiceVersion = config.GetString("ConnectorProtocolVersion", "SIMULATION/0.2"); | ||
91 | |||
92 | if (ServiceVersion != "SIMULATION/0.1" && ServiceVersion != "SIMULATION/0.2") | ||
93 | throw new Exception(string.Format("Invalid ConnectorProtocolVersion {0}", ServiceVersion)); | ||
94 | |||
95 | m_log.InfoFormat( | ||
96 | "[LOCAL SIMULATION CONNECTOR]: Initialzied with connector protocol version {0}", ServiceVersion); | ||
97 | } | ||
98 | } | ||
99 | |||
95 | public void PostInitialise() | 100 | public void PostInitialise() |
96 | { | 101 | { |
97 | } | 102 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index 8722b80..f45f560 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -50,9 +50,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteSimulationConnectorModule")] | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteSimulationConnectorModule")] |
51 | public class RemoteSimulationConnectorModule : ISharedRegionModule, ISimulationService | 51 | public class RemoteSimulationConnectorModule : ISharedRegionModule, ISimulationService |
52 | { | 52 | { |
53 | private bool initialized = false; | ||
54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | 54 | ||
55 | private bool initialized = false; | ||
56 | protected bool m_enabled = false; | 56 | protected bool m_enabled = false; |
57 | protected Scene m_aScene; | 57 | protected Scene m_aScene; |
58 | // RemoteSimulationConnector does not care about local regions; it delegates that to the Local module | 58 | // RemoteSimulationConnector does not care about local regions; it delegates that to the Local module |
@@ -64,27 +64,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
64 | 64 | ||
65 | #region Region Module interface | 65 | #region Region Module interface |
66 | 66 | ||
67 | public virtual void Initialise(IConfigSource config) | 67 | public virtual void Initialise(IConfigSource configSource) |
68 | { | 68 | { |
69 | 69 | IConfig moduleConfig = configSource.Configs["Modules"]; | |
70 | IConfig moduleConfig = config.Configs["Modules"]; | ||
71 | if (moduleConfig != null) | 70 | if (moduleConfig != null) |
72 | { | 71 | { |
73 | string name = moduleConfig.GetString("SimulationServices", ""); | 72 | string name = moduleConfig.GetString("SimulationServices", ""); |
74 | if (name == Name) | 73 | if (name == Name) |
75 | { | 74 | { |
76 | //IConfig userConfig = config.Configs["SimulationService"]; | 75 | m_localBackend = new LocalSimulationConnectorModule(); |
77 | //if (userConfig == null) | 76 | |
78 | //{ | 77 | m_localBackend.InitialiseService(configSource); |
79 | // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini"); | ||
80 | // return; | ||
81 | //} | ||
82 | 78 | ||
83 | m_remoteConnector = new SimulationServiceConnector(); | 79 | m_remoteConnector = new SimulationServiceConnector(); |
84 | 80 | ||
85 | m_enabled = true; | 81 | m_enabled = true; |
86 | 82 | ||
87 | m_log.Info("[SIMULATION CONNECTOR]: Remote simulation enabled"); | 83 | m_log.Info("[REMOTE SIMULATION CONNECTOR]: Remote simulation enabled."); |
88 | } | 84 | } |
89 | } | 85 | } |
90 | } | 86 | } |
@@ -142,8 +138,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
142 | } | 138 | } |
143 | 139 | ||
144 | protected virtual void InitOnce(Scene scene) | 140 | protected virtual void InitOnce(Scene scene) |
145 | { | 141 | { |
146 | m_localBackend = new LocalSimulationConnectorModule(); | ||
147 | m_aScene = scene; | 142 | m_aScene = scene; |
148 | //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); | 143 | //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); |
149 | m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); | 144 | m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); |