aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs37
1 files changed, 22 insertions, 15 deletions
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
104 //AgentCreateRequest.Headers.Add("Authorization", authKey); 104 //AgentCreateRequest.Headers.Add("Authorization", authKey);
105 105
106 // Fill it in 106 // Fill it in
107 OSDMap args = null; 107 OSDMap args = PackCreateAgentArguments(aCircuit, destination, flags);
108 try
109 {
110 args = aCircuit.PackAgentCircuitData();
111 }
112 catch (Exception e)
113 {
114 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
115 }
116 // Add the input arguments
117 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
118 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
119 args["destination_name"] = OSD.FromString(destination.RegionName);
120 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
121 args["teleport_flags"] = OSD.FromString(flags.ToString());
122 108
123 string strBuffer = ""; 109 string strBuffer = "";
124 byte[] buffer = new byte[1]; 110 byte[] buffer = new byte[1];
@@ -214,6 +200,27 @@ namespace OpenSim.Services.Connectors.Simulation
214 return true; 200 return true;
215 } 201 }
216 202
203 protected virtual OSDMap PackCreateAgentArguments(AgentCircuitData aCircuit, GridRegion destination, uint flags)
204 {
205 OSDMap args = null;
206 try
207 {
208 args = aCircuit.PackAgentCircuitData();
209 }
210 catch (Exception e)
211 {
212 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
213 }
214 // Add the input arguments
215 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
216 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
217 args["destination_name"] = OSD.FromString(destination.RegionName);
218 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
219 args["teleport_flags"] = OSD.FromString(flags.ToString());
220
221 return args;
222 }
223
217 public bool UpdateAgent(GridRegion destination, AgentData data) 224 public bool UpdateAgent(GridRegion destination, AgentData data)
218 { 225 {
219 return UpdateAgent(destination, (IAgentData)data); 226 return UpdateAgent(destination, (IAgentData)data);