aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2007-05-24 13:31:08 +0000
committerMW2007-05-24 13:31:08 +0000
commit5a6ee35df9e4b886e30dc7a0670cf0b1306c60be (patch)
treedf1d94a031ad23ad61d29f59c76b93b8b88976a6 /OpenSim
parentStage 2: GridServices build files should be fixed now, Someone will need to t... (diff)
downloadopensim-SC-5a6ee35df9e4b886e30dc7a0670cf0b1306c60be.zip
opensim-SC-5a6ee35df9e4b886e30dc7a0670cf0b1306c60be.tar.gz
opensim-SC-5a6ee35df9e4b886e30dc7a0670cf0b1306c60be.tar.bz2
opensim-SC-5a6ee35df9e4b886e30dc7a0670cf0b1306c60be.tar.xz
Starts to readd the changes from revisions 768,769 and 770 before Adam notices they got lost in the restructuring.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.Grid.cs71
1 files changed, 39 insertions, 32 deletions
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.Grid.cs b/OpenSim/OpenSim.RegionServer/ClientView.Grid.cs
index a3b191c..5229dbd 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.Grid.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.Grid.cs
@@ -35,38 +35,45 @@ namespace OpenSim
35 35
36 foreach (Hashtable neighbour in gridServer.neighbours) 36 foreach (Hashtable neighbour in gridServer.neighbours)
37 { 37 {
38 string neighbourIPStr = (string)neighbour["sim_ip"]; 38 try
39 System.Net.IPAddress neighbourIP = System.Net.IPAddress.Parse(neighbourIPStr); 39 {
40 ushort neighbourPort = (ushort)Convert.ToInt32(neighbour["sim_port"]); 40 string neighbourIPStr = (string)neighbour["sim_ip"];
41 string reqUrl = "http://" + neighbourIPStr + ":" + neighbourPort.ToString(); 41 System.Net.IPAddress neighbourIP = System.Net.IPAddress.Parse(neighbourIPStr);
42 42 ushort neighbourPort = (ushort)Convert.ToInt32(neighbour["sim_port"]);
43 Console.WriteLine(reqUrl); 43 string reqUrl = "http://" + neighbourIPStr + ":" + neighbourPort.ToString();
44 44
45 SimParams = new Hashtable(); 45 Console.WriteLine(reqUrl);
46 SimParams["session_id"] = this.SessionID.ToString(); 46
47 SimParams["secure_session_id"] = this.SecureSessionID.ToString(); 47 SimParams = new Hashtable();
48 SimParams["firstname"] = this.ClientAvatar.firstname; 48 SimParams["session_id"] = this.SessionID.ToString();
49 SimParams["lastname"] = this.ClientAvatar.lastname; 49 SimParams["secure_session_id"] = this.SecureSessionID.ToString();
50 SimParams["agent_id"] = this.AgentID.ToString(); 50 SimParams["firstname"] = this.ClientAvatar.firstname;
51 SimParams["circuit_code"] = (Int32)this.CircuitCode; 51 SimParams["lastname"] = this.ClientAvatar.lastname;
52 SimParams["child_agent"] = "1"; 52 SimParams["agent_id"] = this.AgentID.ToString();
53 SendParams = new ArrayList(); 53 SimParams["circuit_code"] = (Int32)this.CircuitCode;
54 SendParams.Add(SimParams); 54 SimParams["child_agent"] = "1";
55 55 SendParams = new ArrayList();
56 GridReq = new XmlRpcRequest("expect_user", SendParams); 56 SendParams.Add(SimParams);
57 GridResp = GridReq.Send(reqUrl, 3000); 57
58 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket(); 58 GridReq = new XmlRpcRequest("expect_user", SendParams);
59 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock(); 59 GridResp = GridReq.Send(reqUrl, 3000);
60 enablesimpacket.SimulatorInfo.Handle = Helpers.UIntsToLong((uint)(Convert.ToInt32(neighbour["region_locx"]) * 256), (uint)(Convert.ToInt32(neighbour["region_locy"]) * 256)); 60 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket();
61 61 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock();
62 62 enablesimpacket.SimulatorInfo.Handle = Helpers.UIntsToLong((uint)(Convert.ToInt32(neighbour["region_locx"]) * 256), (uint)(Convert.ToInt32(neighbour["region_locy"]) * 256));
63 byte[] byteIP = neighbourIP.GetAddressBytes(); 63
64 enablesimpacket.SimulatorInfo.IP = (uint)byteIP[3] << 24; 64
65 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[2] << 16; 65 byte[] byteIP = neighbourIP.GetAddressBytes();
66 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8; 66 enablesimpacket.SimulatorInfo.IP = (uint)byteIP[3] << 24;
67 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0]; 67 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[2] << 16;
68 enablesimpacket.SimulatorInfo.Port = neighbourPort; 68 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8;
69 enablePackets.Add(enablesimpacket); 69 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0];
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 }
70 } 77 }
71 Thread.Sleep(3000); 78 Thread.Sleep(3000);
72 foreach (Packet enable in enablePackets) 79 foreach (Packet enable in enablePackets)