aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs39
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs4
-rw-r--r--OpenSim/Services/Interfaces/IAvatarService.cs12
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs14
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs5
6 files changed, 53 insertions, 23 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
index 243da52..c7d658a 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
@@ -524,7 +524,9 @@ namespace OpenSim.Services.Connectors
524 { 524 {
525 InventoryItemBase retrieved = null; 525 InventoryItemBase retrieved = null;
526 if (m_ItemCache.TryGetValue(item.ID, out retrieved)) 526 if (m_ItemCache.TryGetValue(item.ID, out retrieved))
527 {
527 return retrieved; 528 return retrieved;
529 }
528 530
529 try 531 try
530 { 532 {
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 493d7e0..ebffa28 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -283,11 +283,9 @@ namespace OpenSim.Services.Connectors.Simulation
283 } 283 }
284 284
285 285
286 286 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> featuresAvailable, EntityTransferContext ctx, out string reason)
287 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, List<UUID> featuresAvailable, out string version, out string reason)
288 { 287 {
289 reason = "Failed to contact destination"; 288 reason = "Failed to contact destination";
290 version = "Unknown";
291 289
292 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position); 290 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position);
293 291
@@ -300,7 +298,14 @@ namespace OpenSim.Services.Connectors.Simulation
300 OSDMap request = new OSDMap(); 298 OSDMap request = new OSDMap();
301 request.Add("viaTeleport", OSD.FromBoolean(viaTeleport)); 299 request.Add("viaTeleport", OSD.FromBoolean(viaTeleport));
302 request.Add("position", OSD.FromString(position.ToString())); 300 request.Add("position", OSD.FromString(position.ToString()));
303 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));
304 309
305 OSDArray features = new OSDArray(); 310 OSDArray features = new OSDArray();
306 foreach (UUID feature in featuresAvailable) 311 foreach (UUID feature in featuresAvailable)
@@ -324,15 +329,30 @@ namespace OpenSim.Services.Connectors.Simulation
324 success = data["success"]; 329 success = data["success"];
325 330
326 reason = data["reason"].AsString(); 331 reason = data["reason"].AsString();
327 if (data["version"] != null && data["version"].AsString() != string.Empty) 332 // We will need to plumb this and start sing the outbound version as well
328 version = data["version"].AsString(); 333 // TODO: lay the pipe for version plumbing
334 if (data.ContainsKey("negotiated_inbound_version") && data["negotiated_inbound_version"] != null)
335 {
336 ctx.InboundVersion = (float)data["negotiated_inbound_version"].AsReal();
337 ctx.OutboundVersion = (float)data["negotiated_outbound_version"].AsReal();
338 }
339 else if (data["version"] != null && data["version"].AsString() != string.Empty)
340 {
341 string versionString = data["version"].AsString();
342 String[] parts = versionString.Split(new char[] {'/'});
343 if (parts.Length > 1)
344 {
345 ctx.InboundVersion = float.Parse(parts[1]);
346 ctx.OutboundVersion = float.Parse(parts[1]);
347 }
348 }
329 349
330 m_log.DebugFormat( 350 m_log.DebugFormat(
331 "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version {3} ({4})", 351 "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version {3}/{4}",
332 uri, success, reason, version, data["version"].AsString()); 352 uri, success, reason, ctx.InboundVersion, ctx.OutboundVersion);
333 } 353 }
334 354
335 if (!success) 355 if (!success || ctx.InboundVersion == 0f || ctx.OutboundVersion == 0f)
336 { 356 {
337 // If we don't check this then OpenSimulator 0.7.3.1 and some period before will never see the 357 // If we don't check this then OpenSimulator 0.7.3.1 and some period before will never see the
338 // actual failure message 358 // actual failure message
@@ -451,7 +471,6 @@ namespace OpenSim.Services.Connectors.Simulation
451 args["destination_name"] = OSD.FromString(destination.RegionName); 471 args["destination_name"] = OSD.FromString(destination.RegionName);
452 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 472 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
453 473
454
455 OSDMap result = WebUtil.PostToService(uri, args, 40000, false); 474 OSDMap result = WebUtil.PostToService(uri, args, 40000, false);
456 475
457 if (result == null) 476 if (result == null)
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index bee3db3..692ef06 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -452,12 +452,12 @@ 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 EntityTransferContext ctx = new EntityTransferContext();
456 456
457 string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion); 457 string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
458 if (!m_SimulationService.QueryAccess( 458 if (!m_SimulationService.QueryAccess(
459 destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), 459 destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(),
460 true, aCircuit.startpos, myversion, new List<UUID>(), out version, out reason)) 460 true, aCircuit.startpos, new List<UUID>(), ctx, out reason))
461 return false; 461 return false;
462 462
463 return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); 463 return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason);
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs
index 3663a7a..bd66dad 100644
--- a/OpenSim/Services/Interfaces/IAvatarService.cs
+++ b/OpenSim/Services/Interfaces/IAvatarService.cs
@@ -162,12 +162,11 @@ namespace OpenSim.Services.Interfaces
162 } 162 }
163 163
164 // Visual Params 164 // Visual Params
165 // string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; 165 //string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT];
166 // byte[] binary = appearance.VisualParams; 166 //byte[] binary = appearance.VisualParams;
167 167
168 // for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) 168 // for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++)
169 169
170
171 byte[] binary = appearance.VisualParams; 170 byte[] binary = appearance.VisualParams;
172 string[] vps = new string[binary.Length]; 171 string[] vps = new string[binary.Length];
173 172
@@ -285,14 +284,13 @@ namespace OpenSim.Services.Interfaces
285 if (Data.ContainsKey("VisualParams")) 284 if (Data.ContainsKey("VisualParams"))
286 { 285 {
287 string[] vps = Data["VisualParams"].Split(new char[] {','}); 286 string[] vps = Data["VisualParams"].Split(new char[] {','});
288 // byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; 287 //byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT];
289 288
290 // for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) 289 //for (int i = 0 ; i < vps.Length && i < binary.Length ; i++)
291 byte[] binary = new byte[vps.Length]; 290 byte[] binary = new byte[vps.Length];
292 291
293 for (int i = 0; i < vps.Length; i++) 292 for (int i = 0; i < vps.Length; i++)
294 293 binary[i] = (byte)Convert.ToInt32(vps[i]);
295 binary[i] = (byte)Convert.ToInt32(vps[i]);
296 294
297 appearance.VisualParams = binary; 295 appearance.VisualParams = binary;
298 } 296 }
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 3573bea..257b578 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -34,6 +34,18 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
34 34
35namespace OpenSim.Services.Interfaces 35namespace OpenSim.Services.Interfaces
36{ 36{
37 public class EntityTransferContext
38 {
39 public EntityTransferContext()
40 {
41 InboundVersion = VersionInfo.SimulationServiceVersionAcceptedMax;
42 OutboundVersion = VersionInfo.SimulationServiceVersionSupportedMax;
43 }
44
45 public float InboundVersion { get; set; }
46 public float OutboundVersion { get; set; }
47 }
48
37 public interface ISimulationService 49 public interface ISimulationService
38 { 50 {
39 /// <summary> 51 /// <summary>
@@ -93,7 +105,7 @@ namespace OpenSim.Services.Interfaces
93 /// <param name="version">Version that the target simulator is running</param> 105 /// <param name="version">Version that the target simulator is running</param>
94 /// <param name="reason">[out] Optional error message</param> 106 /// <param name="reason">[out] Optional error message</param>
95 /// <returns>True: ok; False: not allowed</returns> 107 /// <returns>True: ok; False: not allowed</returns>
96 bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, List<UUID> features, out string version, out string reason); 108 bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, EntityTransferContext ctx, out string reason);
97 109
98 /// <summary> 110 /// <summary>
99 /// Message from receiving region to departing region, telling it got contacted by the client. 111 /// 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 5829212..619a527 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -993,11 +993,10 @@ namespace OpenSim.Services.LLLoginService
993 993
994 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) 994 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason)
995 { 995 {
996 string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion); 996 EntityTransferContext ctx = new EntityTransferContext();
997 string version;
998 997
999 if (!simConnector.QueryAccess( 998 if (!simConnector.QueryAccess(
1000 region, aCircuit.AgentID, null, true, aCircuit.startpos, myversion, new List<UUID>(), out version, out reason)) 999 region, aCircuit.AgentID, null, true, aCircuit.startpos, new List<UUID>(), ctx, out reason))
1001 return false; 1000 return false;
1002 1001
1003 return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); 1002 return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason);