diff options
Diffstat (limited to 'OpenSim.RegionServer/OpenSimMain.cs')
-rw-r--r-- | OpenSim.RegionServer/OpenSimMain.cs | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 7f2032d..ea6088b 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim | |||
67 | //private Dictionary<uint, SimClient> ClientThreads = new Dictionary<uint, SimClient>(); | 67 | //private Dictionary<uint, SimClient> ClientThreads = new Dictionary<uint, SimClient>(); |
68 | private Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); | 68 | private Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); |
69 | private DateTime startuptime; | 69 | private DateTime startuptime; |
70 | public RegionInfo regionData; | 70 | private RegionInfo regionData; |
71 | 71 | ||
72 | public Socket Server; | 72 | public Socket Server; |
73 | private IPEndPoint ServerIncoming; | 73 | private IPEndPoint ServerIncoming; |
@@ -206,23 +206,29 @@ namespace OpenSim | |||
206 | agent_data.firstname = (string)requestData["firstname"]; | 206 | agent_data.firstname = (string)requestData["firstname"]; |
207 | agent_data.lastname = (string)requestData["lastname"]; | 207 | agent_data.lastname = (string)requestData["lastname"]; |
208 | agent_data.AgentID = new LLUUID((string)requestData["agent_id"]); | 208 | agent_data.AgentID = new LLUUID((string)requestData["agent_id"]); |
209 | agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); | 209 | agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); |
210 | if(requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) { | 210 | if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) |
211 | agent_data.child=true; | 211 | { |
212 | } else { | 212 | agent_data.child = true; |
213 | agent_data.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]),Convert.ToUInt32(requestData["startpos_y"]),Convert.ToUInt32(requestData["startpos_z"])); | 213 | } |
214 | agent_data.child=false; | 214 | else |
215 | } | 215 | { |
216 | 216 | agent_data.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"])); | |
217 | if(((RemoteGridBase)gridServer).agentcircuits.ContainsKey((uint)agent_data.circuitcode)) { | 217 | agent_data.child = false; |
218 | ((RemoteGridBase)gridServer).agentcircuits[(uint)agent_data.circuitcode]=agent_data; | 218 | } |
219 | } else { | 219 | |
220 | ((RemoteGridBase)gridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); | 220 | if (((RemoteGridBase)gridServer).agentcircuits.ContainsKey((uint)agent_data.circuitcode)) |
221 | } | 221 | { |
222 | ((RemoteGridBase)gridServer).agentcircuits[(uint)agent_data.circuitcode] = agent_data; | ||
223 | } | ||
224 | else | ||
225 | { | ||
226 | ((RemoteGridBase)gridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); | ||
227 | } | ||
222 | 228 | ||
223 | return new XmlRpcResponse(); | 229 | return new XmlRpcResponse(); |
224 | }); | 230 | }); |
225 | 231 | ||
226 | httpServer.AddXmlRPCHandler("agent_crossing", | 232 | httpServer.AddXmlRPCHandler("agent_crossing", |
227 | delegate(XmlRpcRequest request) | 233 | delegate(XmlRpcRequest request) |
228 | { | 234 | { |
@@ -230,18 +236,19 @@ namespace OpenSim | |||
230 | AgentCircuitData agent_data = new AgentCircuitData(); | 236 | AgentCircuitData agent_data = new AgentCircuitData(); |
231 | agent_data.firstname = (string)requestData["firstname"]; | 237 | agent_data.firstname = (string)requestData["firstname"]; |
232 | agent_data.lastname = (string)requestData["lastname"]; | 238 | agent_data.lastname = (string)requestData["lastname"]; |
233 | agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); | 239 | agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); |
234 | agent_data.startpos = new LLVector3(Single.Parse((string)requestData["pos_x"]),Single.Parse((string)requestData["pos_y"]),Single.Parse((string)requestData["pos_z"])); | 240 | agent_data.startpos = new LLVector3(Single.Parse((string)requestData["pos_x"]), Single.Parse((string)requestData["pos_y"]), Single.Parse((string)requestData["pos_z"])); |
235 | 241 | ||
236 | if(((RemoteGridBase)gridServer).agentcircuits.ContainsKey((uint)agent_data.circuitcode)) { | 242 | if (((RemoteGridBase)gridServer).agentcircuits.ContainsKey((uint)agent_data.circuitcode)) |
237 | ((RemoteGridBase)gridServer).agentcircuits[(uint)agent_data.circuitcode].firstname = agent_data.firstname; | 243 | { |
238 | ((RemoteGridBase)gridServer).agentcircuits[(uint)agent_data.circuitcode].lastname = agent_data.lastname; | 244 | ((RemoteGridBase)gridServer).agentcircuits[(uint)agent_data.circuitcode].firstname = agent_data.firstname; |
239 | ((RemoteGridBase)gridServer).agentcircuits[(uint)agent_data.circuitcode].startpos = agent_data.startpos; | 245 | ((RemoteGridBase)gridServer).agentcircuits[(uint)agent_data.circuitcode].lastname = agent_data.lastname; |
240 | } | 246 | ((RemoteGridBase)gridServer).agentcircuits[(uint)agent_data.circuitcode].startpos = agent_data.startpos; |
247 | } | ||
241 | 248 | ||
242 | return new XmlRpcResponse(); | 249 | return new XmlRpcResponse(); |
243 | }); | 250 | }); |
244 | 251 | ||
245 | httpServer.AddRestHandler("GET", "/simstatus/", | 252 | httpServer.AddRestHandler("GET", "/simstatus/", |
246 | delegate(string request, string path, string param) | 253 | delegate(string request, string path, string param) |
247 | { | 254 | { |
@@ -313,7 +320,7 @@ namespace OpenSim | |||
313 | pluginAssembly = null; | 320 | pluginAssembly = null; |
314 | return config; | 321 | return config; |
315 | } | 322 | } |
316 | 323 | ||
317 | private void OnReceivedData(IAsyncResult result) | 324 | private void OnReceivedData(IAsyncResult result) |
318 | { | 325 | { |
319 | ipeSender = new IPEndPoint(IPAddress.Any, 0); | 326 | ipeSender = new IPEndPoint(IPAddress.Any, 0); |
@@ -342,7 +349,7 @@ namespace OpenSim | |||
342 | { | 349 | { |
343 | isChildAgent = ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[useCircuit.CircuitCode.Code].child; | 350 | isChildAgent = ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[useCircuit.CircuitCode.Code].child; |
344 | } | 351 | } |
345 | SimClient newuser = new SimClient(epSender, useCircuit, LocalWorld, _packetServer.ClientThreads, AssetCache, GridServers.GridServer, this, InventoryCache, m_sandbox, isChildAgent); | 352 | SimClient newuser = new SimClient(epSender, useCircuit, LocalWorld, _packetServer.ClientThreads, AssetCache, GridServers.GridServer, this, InventoryCache, m_sandbox, isChildAgent, this.regionData); |
346 | if ((this.GridServers.UserServer != null) && (user_accounts)) | 353 | if ((this.GridServers.UserServer != null) && (user_accounts)) |
347 | { | 354 | { |
348 | newuser.UserServer = this.GridServers.UserServer; | 355 | newuser.UserServer = this.GridServers.UserServer; |