aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation
diff options
context:
space:
mode:
authorMelanie Thielker2015-10-31 00:01:35 +0100
committerMelanie Thielker2015-10-31 00:01:35 +0100
commitdc6d9eadf33b9a0321664d676030b07b2bd04bed (patch)
tree86d8bd48a294b7e0adaf0c6c85c69f4752382c9f /OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation
parentfix services handling of visualparameters, avoiding possible crashs (mantis 7... (diff)
downloadopensim-SC-dc6d9eadf33b9a0321664d676030b07b2bd04bed.zip
opensim-SC-dc6d9eadf33b9a0321664d676030b07b2bd04bed.tar.gz
opensim-SC-dc6d9eadf33b9a0321664d676030b07b2bd04bed.tar.bz2
opensim-SC-dc6d9eadf33b9a0321664d676030b07b2bd04bed.tar.xz
Testing stage of the new versioning system. Use at own risk. May not
work. Will eat your babies. Yada. Yada.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs15
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs8
2 files changed, 8 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 3800b3f..32ac992 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -81,8 +81,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
81 81
82 public void InitialiseService(IConfigSource configSource) 82 public void InitialiseService(IConfigSource configSource)
83 { 83 {
84 ServiceVersion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
85 m_log.InfoFormat("[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
86 } 84 }
87 85
88 public void PostInitialise() 86 public void PostInitialise()
@@ -251,10 +249,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
251 return true; 249 return true;
252 } 250 }
253 251
254 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string theirversion, List<UUID> features, out string version, out string reason) 252 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, out float version, out string reason)
255 { 253 {
256 reason = "Communications failure"; 254 reason = "Communications failure";
257 version = ServiceVersion; 255 version = VersionInfo.SimulationServiceVersionAcceptedMax; // If it's within the process, use max. If it's not, the connector will overwrite this
258 if (destination == null) 256 if (destination == null)
259 return false; 257 return false;
260 258
@@ -265,17 +263,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
265// s.RegionInfo.RegionName, destination.RegionHandle); 263// s.RegionInfo.RegionName, destination.RegionHandle);
266 uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX; 264 uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX;
267 265
268 float theirVersionNumber = 0f;
269 string[] versionComponents = theirversion.Split(new char[] { '/' });
270 if (versionComponents.Length >= 2)
271 float.TryParse(versionComponents[1], out theirVersionNumber);
272
273 // Var regions here, and the requesting simulator is in an older version. 266 // Var regions here, and the requesting simulator is in an older version.
274 // We will forbide this, because it crashes the viewers 267 // We will forbide this, because it crashes the viewers
275 if (theirVersionNumber < 0.3f && size > 256) 268 if (version < 0.3f && size != 256)
276 { 269 {
277 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; 270 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
278 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber); 271 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied");
279 return false; 272 return false;
280 273
281 } 274 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index f963242..e2f52c4 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -205,21 +205,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
205 return m_remoteConnector.UpdateAgent(destination, cAgentData); 205 return m_remoteConnector.UpdateAgent(destination, cAgentData);
206 } 206 }
207 207
208 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, List<UUID> features, out string version, out string reason) 208 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, out float version, out string reason)
209 { 209 {
210 reason = "Communications failure"; 210 reason = "Communications failure";
211 version = "Unknown"; 211 version = 0f;
212 212
213 if (destination == null) 213 if (destination == null)
214 return false; 214 return false;
215 215
216 // Try local first 216 // Try local first
217 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason)) 217 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out version, out reason))
218 return true; 218 return true;
219 219
220 // else do the remote thing 220 // else do the remote thing
221 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 221 if (!m_localBackend.IsLocalRegion(destination.RegionID))
222 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason); 222 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out version, out reason);
223 223
224 return false; 224 return false;
225 } 225 }