aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-02 23:12:54 +0100
committerJustin Clark-Casey (justincc)2013-08-02 23:12:54 +0100
commit54b1071556edf264835f990bb3595064d2b2e2f0 (patch)
treebfa4a7a8e445d070cca956b190ba33a8a6edf21d
parentminor: replace veclist.Add(new Vector3(0,0,0)) with Vector3.Zero in Inventory... (diff)
downloadopensim-SC-54b1071556edf264835f990bb3595064d2b2e2f0.zip
opensim-SC-54b1071556edf264835f990bb3595064d2b2e2f0.tar.gz
opensim-SC-54b1071556edf264835f990bb3595064d2b2e2f0.tar.bz2
opensim-SC-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.
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs33
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs21
-rw-r--r--bin/config-include/Grid.ini11
-rw-r--r--bin/config-include/Standalone.ini11
4 files changed, 49 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);
diff --git a/bin/config-include/Grid.ini b/bin/config-include/Grid.ini
index 15ba55a..1837bdd 100644
--- a/bin/config-include/Grid.ini
+++ b/bin/config-include/Grid.ini
@@ -30,6 +30,17 @@
30 SimulationServiceInConnector = true 30 SimulationServiceInConnector = true
31 LibraryModule = true 31 LibraryModule = true
32 32
33[SimulationService]
34 ; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport
35 ; It is used to control the teleport handoff process.
36 ; Valid values are
37 ; "SIMULATION/0.2"
38 ; - this is the default. A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
39 ; - this protocol is more efficient than "SIMULATION/0.1"
40 ; "SIMULATION/0.1"
41 ; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
42 ConnectorProtocolVersion = "SIMULATION/0.2"
43
33[SimulationDataStore] 44[SimulationDataStore]
34 LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" 45 LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"
35 46
diff --git a/bin/config-include/Standalone.ini b/bin/config-include/Standalone.ini
index d3b9cb4..7b7beb2 100644
--- a/bin/config-include/Standalone.ini
+++ b/bin/config-include/Standalone.ini
@@ -26,6 +26,17 @@
26 GridInfoServiceInConnector = true 26 GridInfoServiceInConnector = true
27 MapImageServiceInConnector = true 27 MapImageServiceInConnector = true
28 28
29[SimulationService]
30 ; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport
31 ; It is used to control the teleport handoff process.
32 ; Valid values are
33 ; "SIMULATION/0.2"
34 ; - this is the default. A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
35 ; - this protocol is more efficient than "SIMULATION/0.1"
36 ; "SIMULATION/0.1"
37 ; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
38 ConnectorProtocolVersion = "SIMULATION/0.2"
39
29[SimulationDataStore] 40[SimulationDataStore]
30 LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" 41 LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"
31 42