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 /OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |
parent | Merge branch 'avinationmerge' of opensimulator.org:/var/git/opensim into avin... (diff) | |
download | opensim-SC_OLD-f88e4a1ec914ddaa9680a62faf96241b87fd0e06.zip opensim-SC_OLD-f88e4a1ec914ddaa9680a62faf96241b87fd0e06.tar.gz opensim-SC_OLD-f88e4a1ec914ddaa9680a62faf96241b87fd0e06.tar.bz2 opensim-SC_OLD-f88e4a1ec914ddaa9680a62faf96241b87fd0e06.tar.xz |
Plumb the rest of the context stuff. Well, what I see so far anyway
Diffstat (limited to 'OpenSim/Server/Handlers/Simulation/AgentHandlers.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 18 |
1 files changed, 14 insertions, 4 deletions
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; |