aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs35
-rw-r--r--Common/OpenSim.Framework/Interfaces/IClientAPI.cs1
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.API.cs2
-rw-r--r--OpenSim/OpenSim.World/World.cs20
-rw-r--r--OpenSim/OpenSim/OpenSimMain.cs4
5 files changed, 51 insertions, 11 deletions
diff --git a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
index 54ca966..c82c820 100644
--- a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
+++ b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
@@ -26,12 +26,17 @@ namespace OpenGrid.Framework.Communications
26 /// <returns></returns> 26 /// <returns></returns>
27 public override RegionCommsHostBase RegisterRegion(RegionInfo regionInfo) 27 public override RegionCommsHostBase RegisterRegion(RegionInfo regionInfo)
28 { 28 {
29 //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
30
29 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) 31 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
30 { 32 {
33 //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle );
34
31 this.regions.Add(regionInfo.RegionHandle, regionInfo); 35 this.regions.Add(regionInfo.RegionHandle, regionInfo);
32 RegionCommsHostBase regionHost = new RegionCommsHostBase(); 36 RegionCommsHostBase regionHost = new RegionCommsHostBase();
33 this.regionHosts.Add(regionInfo.RegionHandle, regionHost); 37 this.regionHosts.Add(regionInfo.RegionHandle, regionHost);
34 38
39
35 return regionHost; 40 return regionHost;
36 } 41 }
37 42
@@ -46,7 +51,26 @@ namespace OpenGrid.Framework.Communications
46 /// <returns></returns> 51 /// <returns></returns>
47 public override List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) 52 public override List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
48 { 53 {
49 return null; 54 // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle);
55 List<RegionInfo> neighbours = new List<RegionInfo>();
56
57 foreach (RegionInfo reg in this.regions.Values)
58 {
59 // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY);
60 if (reg.RegionHandle != regionInfo.RegionHandle)
61 {
62 //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location");
63 if ((reg.RegionLocX > (regionInfo.RegionLocX - 2)) && (reg.RegionLocX < (regionInfo.RegionLocX + 2)))
64 {
65 if ((reg.RegionLocY > (regionInfo.RegionLocY - 2)) && (reg.RegionLocY < (regionInfo.RegionLocY + 2)))
66 {
67 neighbours.Add(reg);
68 }
69 }
70 }
71 }
72
73 return neighbours;
50 } 74 }
51 75
52 /// <summary> 76 /// <summary>
@@ -55,6 +79,13 @@ namespace OpenGrid.Framework.Communications
55 /// <returns></returns> 79 /// <returns></returns>
56 public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData 80 public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
57 { 81 {
82 //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent");
83 if (this.regionHosts.ContainsKey(regionHandle))
84 {
85 // Console.WriteLine("CommsManager- Informing a region to expect child agent");
86 this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agentData);
87 return true;
88 }
58 return false; 89 return false;
59 } 90 }
60 91
@@ -66,7 +97,7 @@ namespace OpenGrid.Framework.Communications
66 /// <returns></returns> 97 /// <returns></returns>
67 public bool AddNewSession(ulong regionHandle, Login loginData) 98 public bool AddNewSession(ulong regionHandle, Login loginData)
68 { 99 {
69 Console.WriteLine(" comms manager been told to expect new user"); 100 //Console.WriteLine(" comms manager been told to expect new user");
70 AgentCircuitData agent = new AgentCircuitData(); 101 AgentCircuitData agent = new AgentCircuitData();
71 agent.AgentID = loginData.Agent; 102 agent.AgentID = loginData.Agent;
72 agent.firstname = loginData.First; 103 agent.firstname = loginData.First;
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
index 78be30a..810345f 100644
--- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
+++ b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
@@ -84,6 +84,7 @@ namespace OpenSim.Framework.Interfaces
84 void SendRegionHandshake(RegionInfo regionInfo); 84 void SendRegionHandshake(RegionInfo regionInfo);
85 void MoveAgentIntoRegion(RegionInfo regInfo); 85 void MoveAgentIntoRegion(RegionInfo regInfo);
86 void SendAvatarData(RegionInfo regionInfo, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos); 86 void SendAvatarData(RegionInfo regionInfo, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos);
87 void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort);
87 AgentCircuitData RequestClientInfo(); 88 AgentCircuitData RequestClientInfo();
88 } 89 }
89} 90}
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
index e14b7b7..89c1f61 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
@@ -374,7 +374,7 @@ namespace OpenSim
374 return objdata; 374 return objdata;
375 } 375 }
376 376
377 protected void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort) 377 public void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort)
378 { 378 {
379 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket(); 379 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket();
380 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock(); 380 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock();
diff --git a/OpenSim/OpenSim.World/World.cs b/OpenSim/OpenSim.World/World.cs
index 2c5971d..1d56ea3 100644
--- a/OpenSim/OpenSim.World/World.cs
+++ b/OpenSim/OpenSim.World/World.cs
@@ -504,16 +504,22 @@ namespace OpenSim.world
504 /// </summary> 504 /// </summary>
505 protected void InformClientOfNeighbours(IClientAPI remoteClient) 505 protected void InformClientOfNeighbours(IClientAPI remoteClient)
506 { 506 {
507 // Console.WriteLine("informing client of neighbouring regions");
507 List<RegionInfo> neighbours = this.commsManager.RequestNeighbours(this.m_regInfo); 508 List<RegionInfo> neighbours = this.commsManager.RequestNeighbours(this.m_regInfo);
508 509
509 510 //Console.WriteLine("we have " + neighbours.Count + " neighbouring regions");
510 for (int i = 0; i < neighbours.Count; i++) 511 if (neighbours != null)
511 { 512 {
512 AgentCircuitData agent = remoteClient.RequestClientInfo(); 513 for (int i = 0; i < neighbours.Count; i++)
513 agent.BaseFolder = LLUUID.Zero; 514 {
514 agent.InventoryFolder = LLUUID.Zero; 515 // Console.WriteLine("sending neighbours data");
515 agent.startpos = new LLVector3(128, 128, 70); 516 AgentCircuitData agent = remoteClient.RequestClientInfo();
516 this.commsManager.InformNeighbourOfChildAgent(neighbours[i].RegionHandle, agent); 517 agent.BaseFolder = LLUUID.Zero;
518 agent.InventoryFolder = LLUUID.Zero;
519 agent.startpos = new LLVector3(128, 128, 70);
520 this.commsManager.InformNeighbourOfChildAgent(neighbours[i].RegionHandle, agent);
521 remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, System.Net.IPAddress.Parse(neighbours[i].IPListenAddr), (ushort)neighbours[i].IPListenPort);
522 }
517 } 523 }
518 } 524 }
519 525
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs
index 66aadb0..7c83dee 100644
--- a/OpenSim/OpenSim/OpenSimMain.cs
+++ b/OpenSim/OpenSim/OpenSimMain.cs
@@ -61,6 +61,7 @@ namespace OpenSim
61 private CheckSumServer checkServer; 61 private CheckSumServer checkServer;
62 protected RegionServerCommsManager commsManager; 62 protected RegionServerCommsManager commsManager;
63 63
64
64 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile) 65 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
65 { 66 {
66 this.configFileSetup = useConfigFile; 67 this.configFileSetup = useConfigFile;
@@ -209,6 +210,7 @@ namespace OpenSim
209 210
210 for (int i = 0; i < configFiles.Length; i++) 211 for (int i = 0; i < configFiles.Length; i++)
211 { 212 {
213 regionDat = new RegionInfo();
212 if (m_sandbox) 214 if (m_sandbox)
213 { 215 {
214 AuthenticateSessionsLocal authen = new AuthenticateSessionsLocal(); 216 AuthenticateSessionsLocal authen = new AuthenticateSessionsLocal();
@@ -259,7 +261,7 @@ namespace OpenSim
259 261
260 protected override void SetupHttpListener() 262 protected override void SetupHttpListener()
261 { 263 {
262 httpServer = new BaseHttpServer(regionData[0].IPListenPort); 264 httpServer = new BaseHttpServer(9000); //regionData[0].IPListenPort);
263 265
264 if (!this.m_sandbox) 266 if (!this.m_sandbox)
265 { 267 {