diff options
author | Melanie Thielker | 2015-11-02 00:23:38 +0100 |
---|---|---|
committer | Melanie Thielker | 2015-11-02 00:23:38 +0100 |
commit | f88e4a1ec914ddaa9680a62faf96241b87fd0e06 (patch) | |
tree | 5c58976397d044bf9d18e78409bb846139f13016 | |
parent | Merge branch 'avinationmerge' of opensimulator.org:/var/git/opensim into avin... (diff) | |
download | opensim-SC-f88e4a1ec914ddaa9680a62faf96241b87fd0e06.zip opensim-SC-f88e4a1ec914ddaa9680a62faf96241b87fd0e06.tar.gz opensim-SC-f88e4a1ec914ddaa9680a62faf96241b87fd0e06.tar.bz2 opensim-SC-f88e4a1ec914ddaa9680a62faf96241b87fd0e06.tar.xz |
Plumb the rest of the context stuff. Well, what I see so far anyway
4 files changed, 20 insertions, 6 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs index 95a0510..f3d678f 100644 --- a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs | |||
@@ -62,7 +62,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
62 | } | 62 | } |
63 | 63 | ||
64 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, | 64 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, |
65 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | 65 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason) |
66 | { | 66 | { |
67 | return m_GatekeeperService.LoginAgent(source, aCircuit, destination, out reason); | 67 | return m_GatekeeperService.LoginAgent(source, aCircuit, destination, out reason); |
68 | } | 68 | } |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs index e787f7c..367c481 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs | |||
@@ -118,7 +118,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
118 | 118 | ||
119 | 119 | ||
120 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, | 120 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, |
121 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | 121 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason) |
122 | { | 122 | { |
123 | return m_UserAgentService.LoginAgentToGrid(source, aCircuit, gatekeeper, destination, fromLogin, out reason); | 123 | return m_UserAgentService.LoginAgentToGrid(source, aCircuit, gatekeeper, destination, fromLogin, out reason); |
124 | } | 124 | } |
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 7ab7dea..c19421a 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -120,6 +120,8 @@ namespace OpenSim.Server.Handlers.Simulation | |||
120 | 120 | ||
121 | protected virtual void DoQueryAccess(Hashtable request, Hashtable responsedata, UUID agentID, UUID regionID) | 121 | protected virtual void DoQueryAccess(Hashtable request, Hashtable responsedata, UUID agentID, UUID regionID) |
122 | { | 122 | { |
123 | EntityTransferContext ctx = new EntityTransferContext(); | ||
124 | |||
123 | if (m_SimulationService == null) | 125 | if (m_SimulationService == null) |
124 | { | 126 | { |
125 | m_log.Debug("[AGENT HANDLER]: Agent QUERY called. Harmless but useless."); | 127 | m_log.Debug("[AGENT HANDLER]: Agent QUERY called. Harmless but useless."); |
@@ -155,6 +157,9 @@ namespace OpenSim.Server.Handlers.Simulation | |||
155 | theirVersion = float.Parse(parts[1]); | 157 | theirVersion = float.Parse(parts[1]); |
156 | } | 158 | } |
157 | 159 | ||
160 | if (args.ContainsKey("context")) | ||
161 | ctx.Unpack((OSDMap)args["context"]); | ||
162 | |||
158 | // Decode the new versioning data | 163 | // Decode the new versioning data |
159 | float minVersionRequired = 0f; | 164 | float minVersionRequired = 0f; |
160 | float maxVersionRequired = 0f; | 165 | float maxVersionRequired = 0f; |
@@ -245,7 +250,6 @@ namespace OpenSim.Server.Handlers.Simulation | |||
245 | 250 | ||
246 | string reason; | 251 | string reason; |
247 | // We're sending the version numbers down to the local connector to do the varregion check. | 252 | // We're sending the version numbers down to the local connector to do the varregion check. |
248 | EntityTransferContext ctx = new EntityTransferContext(); | ||
249 | ctx.InboundVersion = inboundVersion; | 253 | ctx.InboundVersion = inboundVersion; |
250 | ctx.OutboundVersion = outboundVersion; | 254 | ctx.OutboundVersion = outboundVersion; |
251 | if (minVersionProvided == 0f) | 255 | if (minVersionProvided == 0f) |
@@ -406,6 +410,8 @@ namespace OpenSim.Server.Handlers.Simulation | |||
406 | 410 | ||
407 | protected void DoAgentPost(Hashtable request, Hashtable responsedata, UUID id) | 411 | protected void DoAgentPost(Hashtable request, Hashtable responsedata, UUID id) |
408 | { | 412 | { |
413 | EntityTransferContext ctx = new EntityTransferContext(); | ||
414 | |||
409 | OSDMap args = Utils.GetOSDMap((string)request["body"]); | 415 | OSDMap args = Utils.GetOSDMap((string)request["body"]); |
410 | if (args == null) | 416 | if (args == null) |
411 | { | 417 | { |
@@ -414,6 +420,9 @@ namespace OpenSim.Server.Handlers.Simulation | |||
414 | return; | 420 | return; |
415 | } | 421 | } |
416 | 422 | ||
423 | if (args.ContainsKey("context")) | ||
424 | ctx.Unpack((OSDMap)args["context"]); | ||
425 | |||
417 | AgentDestinationData data = CreateAgentDestinationData(); | 426 | AgentDestinationData data = CreateAgentDestinationData(); |
418 | UnpackData(args, data, request); | 427 | UnpackData(args, data, request); |
419 | 428 | ||
@@ -461,7 +470,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
461 | //m_regionClient.AdjustUserInformation(aCircuit); | 470 | //m_regionClient.AdjustUserInformation(aCircuit); |
462 | //bool result = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); | 471 | //bool result = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); |
463 | 472 | ||
464 | bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, out reason); | 473 | bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, ctx, out reason); |
465 | 474 | ||
466 | resp["reason"] = OSD.FromString(reason); | 475 | resp["reason"] = OSD.FromString(reason); |
467 | resp["success"] = OSD.FromBoolean(result); | 476 | resp["success"] = OSD.FromBoolean(result); |
@@ -536,12 +545,11 @@ namespace OpenSim.Server.Handlers.Simulation | |||
536 | 545 | ||
537 | // subclasses can override this | 546 | // subclasses can override this |
538 | protected virtual bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, | 547 | protected virtual bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, |
539 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | 548 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason) |
540 | { | 549 | { |
541 | reason = String.Empty; | 550 | reason = String.Empty; |
542 | // The data and protocols are already defined so this is just a dummy to satisfy the interface | 551 | // The data and protocols are already defined so this is just a dummy to satisfy the interface |
543 | // TODO: make this end-to-end | 552 | // TODO: make this end-to-end |
544 | EntityTransferContext ctx = new EntityTransferContext(); | ||
545 | if ((teleportFlags & (uint)TeleportFlags.ViaLogin) == 0) | 553 | if ((teleportFlags & (uint)TeleportFlags.ViaLogin) == 0) |
546 | { | 554 | { |
547 | Util.FireAndForget(x => | 555 | Util.FireAndForget(x => |
@@ -683,6 +691,8 @@ namespace OpenSim.Server.Handlers.Simulation | |||
683 | UUID.TryParse(args["destination_uuid"].AsString(), out uuid); | 691 | UUID.TryParse(args["destination_uuid"].AsString(), out uuid); |
684 | if (args.ContainsKey("destination_name") && args["destination_name"] != null) | 692 | if (args.ContainsKey("destination_name") && args["destination_name"] != null) |
685 | regionname = args["destination_name"].ToString(); | 693 | regionname = args["destination_name"].ToString(); |
694 | if (args.ContainsKey("context")) | ||
695 | ctx.Unpack((OSDMap)args["context"]); | ||
686 | 696 | ||
687 | GridRegion destination = new GridRegion(); | 697 | GridRegion destination = new GridRegion(); |
688 | destination.RegionID = uuid; | 698 | destination.RegionID = uuid; |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 0ebd37e..1302a22 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -122,6 +122,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
122 | try | 122 | try |
123 | { | 123 | { |
124 | OSDMap args = aCircuit.PackAgentCircuitData(ctx); | 124 | OSDMap args = aCircuit.PackAgentCircuitData(ctx); |
125 | args["context"] = ctx.Pack(); | ||
125 | PackData(args, source, aCircuit, destination, flags); | 126 | PackData(args, source, aCircuit, destination, flags); |
126 | 127 | ||
127 | OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); | 128 | OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); |
@@ -266,6 +267,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
266 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); | 267 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); |
267 | args["destination_name"] = OSD.FromString(destination.RegionName); | 268 | args["destination_name"] = OSD.FromString(destination.RegionName); |
268 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | 269 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); |
270 | args["context"] = ctx.Pack(); | ||
269 | 271 | ||
270 | OSDMap result = WebUtil.PutToServiceCompressed(uri, args, timeout); | 272 | OSDMap result = WebUtil.PutToServiceCompressed(uri, args, timeout); |
271 | if (result["Success"].AsBoolean()) | 273 | if (result["Success"].AsBoolean()) |
@@ -308,6 +310,8 @@ namespace OpenSim.Services.Connectors.Simulation | |||
308 | request.Add("simulation_service_accepted_min", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMin)); | 310 | request.Add("simulation_service_accepted_min", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMin)); |
309 | request.Add("simulation_service_accepted_max", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMax)); | 311 | request.Add("simulation_service_accepted_max", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMax)); |
310 | 312 | ||
313 | request.Add("context", ctx.Pack()); | ||
314 | |||
311 | OSDArray features = new OSDArray(); | 315 | OSDArray features = new OSDArray(); |
312 | foreach (UUID feature in featuresAvailable) | 316 | foreach (UUID feature in featuresAvailable) |
313 | features.Add(OSD.FromString(feature.ToString())); | 317 | features.Add(OSD.FromString(feature.ToString())); |