aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim-Source/OpenSim.RegionServer/ClientView.Grid.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim-Source/OpenSim.RegionServer/ClientView.Grid.cs (renamed from OpenSim.RegionServer/ClientView.Grid.cs)71
1 files changed, 32 insertions, 39 deletions
diff --git a/OpenSim.RegionServer/ClientView.Grid.cs b/OpenSim-Source/OpenSim.RegionServer/ClientView.Grid.cs
index 5229dbd..a3b191c 100644
--- a/OpenSim.RegionServer/ClientView.Grid.cs
+++ b/OpenSim-Source/OpenSim.RegionServer/ClientView.Grid.cs
@@ -35,45 +35,38 @@ namespace OpenSim
35 35
36 foreach (Hashtable neighbour in gridServer.neighbours) 36 foreach (Hashtable neighbour in gridServer.neighbours)
37 { 37 {
38 try 38 string neighbourIPStr = (string)neighbour["sim_ip"];
39 { 39 System.Net.IPAddress neighbourIP = System.Net.IPAddress.Parse(neighbourIPStr);
40 string neighbourIPStr = (string)neighbour["sim_ip"]; 40 ushort neighbourPort = (ushort)Convert.ToInt32(neighbour["sim_port"]);
41 System.Net.IPAddress neighbourIP = System.Net.IPAddress.Parse(neighbourIPStr); 41 string reqUrl = "http://" + neighbourIPStr + ":" + neighbourPort.ToString();
42 ushort neighbourPort = (ushort)Convert.ToInt32(neighbour["sim_port"]); 42
43 string reqUrl = "http://" + neighbourIPStr + ":" + neighbourPort.ToString(); 43 Console.WriteLine(reqUrl);
44 44
45 Console.WriteLine(reqUrl); 45 SimParams = new Hashtable();
46 46 SimParams["session_id"] = this.SessionID.ToString();
47 SimParams = new Hashtable(); 47 SimParams["secure_session_id"] = this.SecureSessionID.ToString();
48 SimParams["session_id"] = this.SessionID.ToString(); 48 SimParams["firstname"] = this.ClientAvatar.firstname;
49 SimParams["secure_session_id"] = this.SecureSessionID.ToString(); 49 SimParams["lastname"] = this.ClientAvatar.lastname;
50 SimParams["firstname"] = this.ClientAvatar.firstname; 50 SimParams["agent_id"] = this.AgentID.ToString();
51 SimParams["lastname"] = this.ClientAvatar.lastname; 51 SimParams["circuit_code"] = (Int32)this.CircuitCode;
52 SimParams["agent_id"] = this.AgentID.ToString(); 52 SimParams["child_agent"] = "1";
53 SimParams["circuit_code"] = (Int32)this.CircuitCode; 53 SendParams = new ArrayList();
54 SimParams["child_agent"] = "1"; 54 SendParams.Add(SimParams);
55 SendParams = new ArrayList(); 55
56 SendParams.Add(SimParams); 56 GridReq = new XmlRpcRequest("expect_user", SendParams);
57 57 GridResp = GridReq.Send(reqUrl, 3000);
58 GridReq = new XmlRpcRequest("expect_user", SendParams); 58 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket();
59 GridResp = GridReq.Send(reqUrl, 3000); 59 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock();
60 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket(); 60 enablesimpacket.SimulatorInfo.Handle = Helpers.UIntsToLong((uint)(Convert.ToInt32(neighbour["region_locx"]) * 256), (uint)(Convert.ToInt32(neighbour["region_locy"]) * 256));
61 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock(); 61
62 enablesimpacket.SimulatorInfo.Handle = Helpers.UIntsToLong((uint)(Convert.ToInt32(neighbour["region_locx"]) * 256), (uint)(Convert.ToInt32(neighbour["region_locy"]) * 256)); 62
63 63 byte[] byteIP = neighbourIP.GetAddressBytes();
64 64 enablesimpacket.SimulatorInfo.IP = (uint)byteIP[3] << 24;
65 byte[] byteIP = neighbourIP.GetAddressBytes(); 65 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[2] << 16;
66 enablesimpacket.SimulatorInfo.IP = (uint)byteIP[3] << 24; 66 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8;
67 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[2] << 16; 67 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0];
68 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8; 68 enablesimpacket.SimulatorInfo.Port = neighbourPort;
69 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0]; 69 enablePackets.Add(enablesimpacket);
70 enablesimpacket.SimulatorInfo.Port = neighbourPort;
71 enablePackets.Add(enablesimpacket);
72 }
73 catch (Exception e)
74 {
75 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Could not connect to neighbour " + neighbour["sim_ip"] + ":" + neighbour["sim_port"] + ", continuing.");
76 }
77 } 70 }
78 Thread.Sleep(3000); 71 Thread.Sleep(3000);
79 foreach (Packet enable in enablePackets) 72 foreach (Packet enable in enablePackets)