From 00f7d622cbc2c2e61d2efaacd8275da3f9821d8b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 28 Jan 2010 19:19:42 -0800 Subject: HG 1.5 is in place. Tested in standalone only. --- .../Simulation/SimulationServiceConnector.cs | 37 +++++++++++++--------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 683fe79..e2ab179 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -104,21 +104,7 @@ namespace OpenSim.Services.Connectors.Simulation //AgentCreateRequest.Headers.Add("Authorization", authKey); // Fill it in - OSDMap args = null; - try - { - args = aCircuit.PackAgentCircuitData(); - } - catch (Exception e) - { - m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); - } - // Add the input arguments - args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); - args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); - args["destination_name"] = OSD.FromString(destination.RegionName); - args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); - args["teleport_flags"] = OSD.FromString(flags.ToString()); + OSDMap args = PackCreateAgentArguments(aCircuit, destination, flags); string strBuffer = ""; byte[] buffer = new byte[1]; @@ -214,6 +200,27 @@ namespace OpenSim.Services.Connectors.Simulation return true; } + protected virtual OSDMap PackCreateAgentArguments(AgentCircuitData aCircuit, GridRegion destination, uint flags) + { + OSDMap args = null; + try + { + args = aCircuit.PackAgentCircuitData(); + } + catch (Exception e) + { + m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); + } + // Add the input arguments + args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); + args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); + args["destination_name"] = OSD.FromString(destination.RegionName); + args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); + args["teleport_flags"] = OSD.FromString(flags.ToString()); + + return args; + } + public bool UpdateAgent(GridRegion destination, AgentData data) { return UpdateAgent(destination, (IAgentData)data); -- cgit v1.1