aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
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
parentfix services handling of visualparameters, avoiding possible crashs (mantis 7... (diff)
downloadopensim-SC_OLD-dc6d9eadf33b9a0321664d676030b07b2bd04bed.zip
opensim-SC_OLD-dc6d9eadf33b9a0321664d676030b07b2bd04bed.tar.gz
opensim-SC_OLD-dc6d9eadf33b9a0321664d676030b07b2bd04bed.tar.bz2
opensim-SC_OLD-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/Services')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs32
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs5
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs2
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs5
4 files changed, 29 insertions, 15 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
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index bee3db3..a2c5327 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -452,12 +452,11 @@ namespace OpenSim.Services.HypergridService
452 452
453 m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0}, Teleport Flags: {1}", aCircuit.Name, loginFlag); 453 m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0}, Teleport Flags: {1}", aCircuit.Name, loginFlag);
454 454
455 string version; 455 float version;
456 456
457 string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
458 if (!m_SimulationService.QueryAccess( 457 if (!m_SimulationService.QueryAccess(
459 destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), 458 destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(),
460 true, aCircuit.startpos, myversion, new List<UUID>(), out version, out reason)) 459 true, aCircuit.startpos, new List<UUID>(), out version, out reason))
461 return false; 460 return false;
462 461
463 return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); 462 return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason);
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 42c414d..6f205ad 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Services.Interfaces
92 /// <param name="version">Version that the target simulator is running</param> 92 /// <param name="version">Version that the target simulator is running</param>
93 /// <param name="reason">[out] Optional error message</param> 93 /// <param name="reason">[out] Optional error message</param>
94 /// <returns>True: ok; False: not allowed</returns> 94 /// <returns>True: ok; False: not allowed</returns>
95 bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, List<UUID> features, out string version, out string reason); 95 bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, out float version, out string reason);
96 96
97 /// <summary> 97 /// <summary>
98 /// Message from receiving region to departing region, telling it got contacted by the client. 98 /// Message from receiving region to departing region, telling it got contacted by the client.
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 9e12f9d..4f8f459 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -983,11 +983,10 @@ namespace OpenSim.Services.LLLoginService
983 983
984 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) 984 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason)
985 { 985 {
986 string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion); 986 float version;
987 string version;
988 987
989 if (!simConnector.QueryAccess( 988 if (!simConnector.QueryAccess(
990 region, aCircuit.AgentID, null, true, aCircuit.startpos, myversion, new List<UUID>(), out version, out reason)) 989 region, aCircuit.AgentID, null, true, aCircuit.startpos, new List<UUID>(), out version, out reason))
991 return false; 990 return false;
992 991
993 return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); 992 return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason);