* refactored a bit and added error msg

zircon^2
lbsa71 2007-05-17 12:47:45 +00:00
parent bafe290c98
commit 51581dba75
1 changed files with 45 additions and 31 deletions

View File

@ -30,15 +30,24 @@ namespace OpenSim
XmlRpcRequest GridReq;
XmlRpcResponse GridResp;
List<Packet> enablePackets = new List<Packet>();
foreach (Hashtable neighbour in ((RemoteGridBase)this.m_gridServer).neighbours)
RemoteGridBase gridServer = (RemoteGridBase)this.m_gridServer;
Dictionary<uint, AgentCircuitData> agentCircuits = gridServer.agentcircuits;
AgentCircuitData agentCircuit;
if (agentCircuits.TryGetValue(CircuitCode, out agentCircuit))
{
foreach (Hashtable neighbour in gridServer.neighbours)
{
Console.WriteLine("http://" + neighbour["sim_ip"] + ":" + neighbour["sim_port"]);
SimParams = new Hashtable();
SimParams["session_id"] = ((RemoteGridBase)this.m_gridServer).agentcircuits[CircuitCode].SessionID.ToString();
SimParams["secure_session_id"] = ((RemoteGridBase)this.m_gridServer).agentcircuits[CircuitCode].SecureSessionID.ToString();
SimParams["firstname"] = ((RemoteGridBase)this.m_gridServer).agentcircuits[CircuitCode].firstname;
SimParams["lastname"] = ((RemoteGridBase)this.m_gridServer).agentcircuits[CircuitCode].lastname;
SimParams["agent_id"] = ((RemoteGridBase)this.m_gridServer).agentcircuits[CircuitCode].AgentID.ToString();
SimParams["session_id"] = agentCircuit.SessionID.ToString();
SimParams["secure_session_id"] = agentCircuit.SecureSessionID.ToString();
SimParams["firstname"] = agentCircuit.firstname;
SimParams["lastname"] = agentCircuit.lastname;
SimParams["agent_id"] = agentCircuit.AgentID.ToString();
SimParams["circuit_code"] = (Int32)this.CircuitCode;
SimParams["child_agent"] = "1";
SendParams = new ArrayList();
@ -66,6 +75,11 @@ namespace OpenSim
enablePackets.Clear();
}
}
else
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL, "SimClient.cs: Couldn't find AgentCircuit for CircuitCode {0}.", CircuitCode );
}
}
public void CrossSimBorder(LLVector3 avatarpos)
{ // VERY VERY BASIC