aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
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/Services/Connectors/Simulation/SimulationServiceConnector.cs
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 '')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs32
1 files changed, 24 insertions, 8 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 1eedbef..5ee2c9c 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -282,10 +282,10 @@ namespace OpenSim.Services.Connectors.Simulation
282 } 282 }
283 283
284 284
285 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, List<UUID> featuresAvailable, out string version, out string reason) 285 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> featuresAvailable, out float version, out string reason)
286 { 286 {
287 reason = "Failed to contact destination"; 287 reason = "Failed to contact destination";
288 version = "Unknown"; 288 version = 0f;
289 289
290 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position); 290 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position);
291 291
@@ -298,7 +298,14 @@ namespace OpenSim.Services.Connectors.Simulation
298 OSDMap request = new OSDMap(); 298 OSDMap request = new OSDMap();
299 request.Add("viaTeleport", OSD.FromBoolean(viaTeleport)); 299 request.Add("viaTeleport", OSD.FromBoolean(viaTeleport));
300 request.Add("position", OSD.FromString(position.ToString())); 300 request.Add("position", OSD.FromString(position.ToString()));
301 request.Add("my_version", OSD.FromString(myversion)); 301 // To those who still understad this field, we're telling them
302 // the lowest version just to be safe
303 request.Add("my_version", OSD.FromString(String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersionSupportedMin)));
304 // New simulation service negotiation
305 request.Add("simulation_service_supported_min", OSD.FromReal(VersionInfo.SimulationServiceVersionSupportedMin));
306 request.Add("simulation_service_supported_max", OSD.FromReal(VersionInfo.SimulationServiceVersionSupportedMax));
307 request.Add("simulation_service_accepted_min", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMin));
308 request.Add("simulation_service_accepted_max", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMax));
302 309
303 OSDArray features = new OSDArray(); 310 OSDArray features = new OSDArray();
304 foreach (UUID feature in featuresAvailable) 311 foreach (UUID feature in featuresAvailable)
@@ -322,15 +329,24 @@ namespace OpenSim.Services.Connectors.Simulation
322 success = data["success"]; 329 success = data["success"];
323 330
324 reason = data["reason"].AsString(); 331 reason = data["reason"].AsString();
325 if (data["version"] != null && data["version"].AsString() != string.Empty) 332 if (data["negotiated_version"] != null)
326 version = data["version"].AsString(); 333 {
334 version = (float)data["negotiated_version"].AsReal();
335 }
336 else if (data["version"] != null && data["version"].AsString() != string.Empty)
337 {
338 string versionString = data["version"].AsString();
339 String[] parts = versionString.Split(new char[] {'/'});
340 if (parts.Length > 1)
341 version = float.Parse(parts[1]);
342 }
327 343
328 m_log.DebugFormat( 344 m_log.DebugFormat(
329 "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version {3} ({4})", 345 "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version SIMULATION/{3}",
330 uri, success, reason, version, data["version"].AsString()); 346 uri, success, reason, version);
331 } 347 }
332 348
333 if (!success) 349 if (!success || version == 0f)
334 { 350 {
335 // If we don't check this then OpenSimulator 0.7.3.1 and some period before will never see the 351 // If we don't check this then OpenSimulator 0.7.3.1 and some period before will never see the
336 // actual failure message 352 // actual failure message