From 980a8cc629fe1228d450fa705fec3bacc3a84d98 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Sun, 24 Jun 2007 17:01:08 +0000
Subject: Refactoring: * Renamed IPListenAddr to CommsIPListenAddr * Renamed
IPListenPort to CommsIPListenPort New Features: * Begun OGS/.1 implementation
-- created new temporary "GridInfo" class to hold grid settings, needs
reworking to wherever settings are stored these days.
---
OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs | 2 +-
OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs | 6 +++---
OpenSim/OpenSim.Region/Scenes/Scene.cs | 9 +++++----
OpenSim/OpenSim.Region/Scenes/ScenePresence.cs | 2 +-
OpenSim/OpenSim/OpenSimMain.cs | 2 +-
5 files changed, 11 insertions(+), 10 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs b/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs
index 4ca088b..ce48c6e 100644
--- a/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs
+++ b/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs
@@ -51,7 +51,7 @@ namespace OpenSim.LocalCommunications
///
///
///
- public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
+ public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo)
{
//Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
diff --git a/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs b/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs
index b8c6c3b..a7f7aa4 100644
--- a/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs
+++ b/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs
@@ -87,11 +87,11 @@ namespace OpenSim.LocalCommunications
"'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
"'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
string capsPath = Util.GetRandomCapsPath();
- response.SimAddress = reg.IPListenAddr;
- response.SimPort = (Int32)reg.IPListenPort;
+ response.SimAddress = reg.CommsIPListenAddr;
+ response.SimPort = (Int32)reg.CommsIPListenPort;
response.RegionX = reg.RegionLocX ;
response.RegionY = reg.RegionLocY ;
- response.SeedCapability = "http://" + reg.IPListenAddr + ":" + "9000" + "/CAPS/"+capsPath +"0000/";
+ response.SeedCapability = "http://" + reg.CommsIPListenAddr + ":" + "9000" + "/CAPS/" + capsPath + "0000/";
theUser.currentAgent.currentRegion = reg.SimUUID;
theUser.currentAgent.currentHandle = reg.RegionHandle;
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs
index ad6d336..62edc4b 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs
@@ -704,7 +704,8 @@ namespace OpenSim.Region.Scenes
///
public void RegisterRegionWithComms()
{
- this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo);
+ GridInfo gridSettings = new GridInfo();
+ this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo,gridSettings);
if (this.regionCommsHost != null)
{
this.regionCommsHost.OnExpectUser += new ExpectUserDelegate(this.NewUserConnection);
@@ -726,7 +727,7 @@ namespace OpenSim.Region.Scenes
if (agent.CapsPath != "")
{
//Console.WriteLine("new user, so creating caps handler for it");
- Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.IPListenAddr, 9000, agent.CapsPath, agent.AgentID);
+ Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.CommsIPListenAddr, 9000, agent.CapsPath, agent.AgentID);
cap.RegisterHandlers();
this.capsHandlers.Add(cap);
}
@@ -765,7 +766,7 @@ namespace OpenSim.Region.Scenes
agent.startpos = new LLVector3(128, 128, 70);
agent.child = true;
this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent);
- remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, System.Net.IPAddress.Parse(neighbours[i].IPListenAddr), (ushort)neighbours[i].IPListenPort);
+ remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr), (ushort)neighbours[i].CommsIPListenPort);
}
}
}
@@ -826,7 +827,7 @@ namespace OpenSim.Region.Scenes
agent.child = true;
this.commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent);
this.commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position);
- remoteClient.SendRegionTeleport(regionHandle, 13, reg.IPListenAddr, (ushort)reg.IPListenPort, 4, (1 << 4));
+ remoteClient.SendRegionTeleport(regionHandle, 13, reg.CommsIPListenAddr, (ushort)reg.CommsIPListenPort, 4, (1 << 4));
}
//remoteClient.SendTeleportCancel();
}
diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs b/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs
index fe82130..e2e30b9 100644
--- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs
+++ b/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs
@@ -444,7 +444,7 @@ namespace OpenSim.Region.Scenes
if (res)
{
this.MakeChildAgent();
- this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, System.Net.IPAddress.Parse(neighbourRegion.IPListenAddr), (ushort)neighbourRegion.IPListenPort);
+ this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, System.Net.IPAddress.Parse(neighbourRegion.CommsIPListenAddr), (ushort)neighbourRegion.CommsIPListenPort);
}
}
}
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs
index 4e2f599..e2dddaf 100644
--- a/OpenSim/OpenSim/OpenSimMain.cs
+++ b/OpenSim/OpenSim/OpenSimMain.cs
@@ -233,7 +233,7 @@ namespace OpenSim
regionDat.InitConfig(this.m_sandbox, regionConfig);
regionConfig.Close();
- udpServer = new UDPServer(regionDat.IPListenPort, this.AssetCache, this.InventoryCache, this.m_log, authenBase);
+ udpServer = new UDPServer(regionDat.CommsIPListenPort, this.AssetCache, this.InventoryCache, this.m_log, authenBase);
m_udpServer.Add(udpServer);
this.regionData.Add(regionDat);
--
cgit v1.1