From f88e4a1ec914ddaa9680a62faf96241b87fd0e06 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 2 Nov 2015 00:23:38 +0100 Subject: Plumb the rest of the context stuff. Well, what I see so far anyway --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim/Server/Handlers/Simulation/AgentHandlers.cs') 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 protected virtual void DoQueryAccess(Hashtable request, Hashtable responsedata, UUID agentID, UUID regionID) { + EntityTransferContext ctx = new EntityTransferContext(); + if (m_SimulationService == null) { m_log.Debug("[AGENT HANDLER]: Agent QUERY called. Harmless but useless."); @@ -155,6 +157,9 @@ namespace OpenSim.Server.Handlers.Simulation theirVersion = float.Parse(parts[1]); } + if (args.ContainsKey("context")) + ctx.Unpack((OSDMap)args["context"]); + // Decode the new versioning data float minVersionRequired = 0f; float maxVersionRequired = 0f; @@ -245,7 +250,6 @@ namespace OpenSim.Server.Handlers.Simulation string reason; // We're sending the version numbers down to the local connector to do the varregion check. - EntityTransferContext ctx = new EntityTransferContext(); ctx.InboundVersion = inboundVersion; ctx.OutboundVersion = outboundVersion; if (minVersionProvided == 0f) @@ -406,6 +410,8 @@ namespace OpenSim.Server.Handlers.Simulation protected void DoAgentPost(Hashtable request, Hashtable responsedata, UUID id) { + EntityTransferContext ctx = new EntityTransferContext(); + OSDMap args = Utils.GetOSDMap((string)request["body"]); if (args == null) { @@ -414,6 +420,9 @@ namespace OpenSim.Server.Handlers.Simulation return; } + if (args.ContainsKey("context")) + ctx.Unpack((OSDMap)args["context"]); + AgentDestinationData data = CreateAgentDestinationData(); UnpackData(args, data, request); @@ -461,7 +470,7 @@ namespace OpenSim.Server.Handlers.Simulation //m_regionClient.AdjustUserInformation(aCircuit); //bool result = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); - bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, out reason); + bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, ctx, out reason); resp["reason"] = OSD.FromString(reason); resp["success"] = OSD.FromBoolean(result); @@ -536,12 +545,11 @@ namespace OpenSim.Server.Handlers.Simulation // subclasses can override this protected virtual bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, - AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) + AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason) { reason = String.Empty; // The data and protocols are already defined so this is just a dummy to satisfy the interface // TODO: make this end-to-end - EntityTransferContext ctx = new EntityTransferContext(); if ((teleportFlags & (uint)TeleportFlags.ViaLogin) == 0) { Util.FireAndForget(x => @@ -683,6 +691,8 @@ namespace OpenSim.Server.Handlers.Simulation UUID.TryParse(args["destination_uuid"].AsString(), out uuid); if (args.ContainsKey("destination_name") && args["destination_name"] != null) regionname = args["destination_name"].ToString(); + if (args.ContainsKey("context")) + ctx.Unpack((OSDMap)args["context"]); GridRegion destination = new GridRegion(); destination.RegionID = uuid; -- cgit v1.1