From 9892e115ccdcc8567087041917fb5c7694aa8836 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 28 Apr 2011 20:19:54 -0700 Subject: Fatpack message on agent transfers: 1 message only (UpdateAgent) containing the agent and all attachments. Preserves backwards compatibility -- older sims get passed attachments one by one. Meaning that I finally introduced versioning in the simulation service. --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 372a59c..8b6fb4f 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -50,6 +50,7 @@ namespace OpenSim.Server.Handlers.Simulation public class AgentHandler { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private ISimulationService m_SimulationService; protected bool m_Proxy = false; @@ -275,7 +276,7 @@ namespace OpenSim.Server.Handlers.Simulation AgentData agent = new AgentData(); try { - agent.Unpack(args); + agent.Unpack(args, m_SimulationService.GetScene(destination.RegionHandle)); } catch (Exception ex) { @@ -295,7 +296,7 @@ namespace OpenSim.Server.Handlers.Simulation AgentPosition agent = new AgentPosition(); try { - agent.Unpack(args); + agent.Unpack(args, m_SimulationService.GetScene(destination.RegionHandle)); } catch (Exception ex) { @@ -342,7 +343,8 @@ namespace OpenSim.Server.Handlers.Simulation destination.RegionID = regionID; string reason; - bool result = m_SimulationService.QueryAccess(destination, id, position, out reason); + string version; + bool result = m_SimulationService.QueryAccess(destination, id, position, out version, out reason); responsedata["int_response_code"] = HttpStatusCode.OK; @@ -350,6 +352,7 @@ namespace OpenSim.Server.Handlers.Simulation resp["success"] = OSD.FromBoolean(result); resp["reason"] = OSD.FromString(reason); + resp["version"] = OSD.FromString(version); responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); } -- cgit v1.1