diff options
author | Adam Frisby | 2007-06-24 17:01:08 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-24 17:01:08 +0000 |
commit | 980a8cc629fe1228d450fa705fec3bacc3a84d98 (patch) | |
tree | 846a3fa7af7994a4c4948c46e28a3a5014f89251 | |
parent | A bit more work on the AssetCache. (diff) | |
download | opensim-SC-980a8cc629fe1228d450fa705fec3bacc3a84d98.zip opensim-SC-980a8cc629fe1228d450fa705fec3bacc3a84d98.tar.gz opensim-SC-980a8cc629fe1228d450fa705fec3bacc3a84d98.tar.bz2 opensim-SC-980a8cc629fe1228d450fa705fec3bacc3a84d98.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | Common/OpenGrid.Framework.Communications/IGridServices.cs | 9 | ||||
-rw-r--r-- | Common/OpenSim.Framework/Types/RegionInfo.cs | 44 | ||||
-rw-r--r-- | OpenSim.sln | 6 | ||||
-rw-r--r-- | OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs | 2 | ||||
-rw-r--r-- | OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs | 6 | ||||
-rw-r--r-- | OpenSim/OpenSim.Region/Scenes/Scene.cs | 9 | ||||
-rw-r--r-- | OpenSim/OpenSim.Region/Scenes/ScenePresence.cs | 2 | ||||
-rw-r--r-- | OpenSim/OpenSim/OpenSimMain.cs | 2 |
8 files changed, 59 insertions, 21 deletions
diff --git a/Common/OpenGrid.Framework.Communications/IGridServices.cs b/Common/OpenGrid.Framework.Communications/IGridServices.cs index b4bc3b6..469cf80 100644 --- a/Common/OpenGrid.Framework.Communications/IGridServices.cs +++ b/Common/OpenGrid.Framework.Communications/IGridServices.cs | |||
@@ -34,9 +34,16 @@ using OpenSim.Framework; | |||
34 | 34 | ||
35 | namespace OpenGrid.Framework.Communications | 35 | namespace OpenGrid.Framework.Communications |
36 | { | 36 | { |
37 | public class GridInfo | ||
38 | { | ||
39 | public string GridServerURI = "http://grid:8001/"; | ||
40 | public string GridServerSendKey = "badger"; | ||
41 | public string GridServerRecvKey = "badger"; | ||
42 | } | ||
43 | |||
37 | public interface IGridServices | 44 | public interface IGridServices |
38 | { | 45 | { |
39 | RegionCommsListener RegisterRegion(RegionInfo regionInfo); | 46 | RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo); |
40 | List<RegionInfo> RequestNeighbours(RegionInfo regionInfo); | 47 | List<RegionInfo> RequestNeighbours(RegionInfo regionInfo); |
41 | RegionInfo RequestNeighbourInfo(ulong regionHandle); | 48 | RegionInfo RequestNeighbourInfo(ulong regionHandle); |
42 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); | 49 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); |
diff --git a/Common/OpenSim.Framework/Types/RegionInfo.cs b/Common/OpenSim.Framework/Types/RegionInfo.cs index 651cd5b..3776c03 100644 --- a/Common/OpenSim.Framework/Types/RegionInfo.cs +++ b/Common/OpenSim.Framework/Types/RegionInfo.cs | |||
@@ -52,8 +52,19 @@ namespace OpenSim.Framework.Types | |||
52 | public string MasterAvatarLastName = ""; | 52 | public string MasterAvatarLastName = ""; |
53 | public string MasterAvatarSandboxPassword = ""; | 53 | public string MasterAvatarSandboxPassword = ""; |
54 | 54 | ||
55 | public int IPListenPort = 0; | 55 | /// <summary> |
56 | public string IPListenAddr = ""; | 56 | /// Port used for listening (TCP and UDP) |
57 | /// </summary> | ||
58 | /// <remarks>Seperate TCP and UDP</remarks> | ||
59 | public int CommsIPListenPort = 0; | ||
60 | /// <summary> | ||
61 | /// Address used for internal listening (default: 0.0.0.0?) | ||
62 | /// </summary> | ||
63 | public string CommsIPListenAddr = ""; | ||
64 | /// <summary> | ||
65 | /// Address used for external addressing (DNS or IP) | ||
66 | /// </summary> | ||
67 | public string CommsExternalAddress = ""; | ||
57 | 68 | ||
58 | 69 | ||
59 | public EstateSettings estateSettings; | 70 | public EstateSettings estateSettings; |
@@ -142,11 +153,11 @@ namespace OpenSim.Framework.Types | |||
142 | { | 153 | { |
143 | string port = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("UDP port for client connections", "9000"); | 154 | string port = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("UDP port for client connections", "9000"); |
144 | configData.SetAttribute("SimListenPort", port); | 155 | configData.SetAttribute("SimListenPort", port); |
145 | this.IPListenPort = Convert.ToInt32(port); | 156 | this.CommsIPListenPort = Convert.ToInt32(port); |
146 | } | 157 | } |
147 | else | 158 | else |
148 | { | 159 | { |
149 | this.IPListenPort = Convert.ToInt32(attri); | 160 | this.CommsIPListenPort = Convert.ToInt32(attri); |
150 | } | 161 | } |
151 | 162 | ||
152 | //Sim Listen Address | 163 | //Sim Listen Address |
@@ -154,8 +165,8 @@ namespace OpenSim.Framework.Types | |||
154 | attri = configData.GetAttribute("SimListenAddress"); | 165 | attri = configData.GetAttribute("SimListenAddress"); |
155 | if (attri == "") | 166 | if (attri == "") |
156 | { | 167 | { |
157 | this.IPListenAddr = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP Address to listen on for client connections", "127.0.0.1"); | 168 | this.CommsIPListenAddr = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP Address to listen on for client connections", "0.0.0.0"); |
158 | configData.SetAttribute("SimListenAddress", this.IPListenAddr); | 169 | configData.SetAttribute("SimListenAddress", this.CommsIPListenAddr); |
159 | } | 170 | } |
160 | else | 171 | else |
161 | { | 172 | { |
@@ -166,20 +177,33 @@ namespace OpenSim.Framework.Types | |||
166 | System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname); | 177 | System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname); |
167 | try | 178 | try |
168 | { | 179 | { |
169 | this.IPListenAddr = ips[0].ToString(); | 180 | this.CommsIPListenAddr = ips[0].ToString(); |
170 | } | 181 | } |
171 | catch (Exception e) | 182 | catch (Exception e) |
172 | { | 183 | { |
173 | e.ToString(); | 184 | e.ToString(); |
174 | this.IPListenAddr = "127.0.0.1"; // Use the default if we fail | 185 | this.CommsIPListenAddr = "0.0.0.0"; // Use the default if we fail |
175 | } | 186 | } |
176 | } | 187 | } |
177 | else | 188 | else |
178 | { | 189 | { |
179 | this.IPListenAddr = attri; | 190 | this.CommsIPListenAddr = attri; |
180 | } | 191 | } |
181 | } | 192 | } |
182 | 193 | ||
194 | // Sim External Address | ||
195 | attri = ""; | ||
196 | attri = configData.GetAttribute("SimExternalAddress"); | ||
197 | if (attri == "") | ||
198 | { | ||
199 | this.CommsExternalAddress = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP or DNS address to send external clients to", "localhost"); | ||
200 | configData.SetAttribute("SimExternalAddress", this.CommsExternalAddress); | ||
201 | } | ||
202 | else | ||
203 | { | ||
204 | this.CommsExternalAddress = attri; | ||
205 | } | ||
206 | |||
183 | attri = ""; | 207 | attri = ""; |
184 | attri = configData.GetAttribute("TerrainFile"); | 208 | attri = configData.GetAttribute("TerrainFile"); |
185 | if (attri == "") | 209 | if (attri == "") |
@@ -263,7 +287,7 @@ namespace OpenSim.Framework.Types | |||
263 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Name: " + this.RegionName); | 287 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Name: " + this.RegionName); |
264 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); | 288 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); |
265 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Handle: " + this.RegionHandle.ToString()); | 289 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Handle: " + this.RegionHandle.ToString()); |
266 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort); | 290 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Listening on IP: " + this.CommsIPListenAddr + ":" + this.CommsIPListenPort); |
267 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Sandbox Mode? " + isSandbox.ToString()); | 291 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Sandbox Mode? " + isSandbox.ToString()); |
268 | 292 | ||
269 | } | 293 | } |
diff --git a/OpenSim.sln b/OpenSim.sln index 45849b1..d91db00 100644 --- a/OpenSim.sln +++ b/OpenSim.sln | |||
@@ -50,6 +50,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApp", "OpenSim\Exampl | |||
50 | EndProject | 50 | EndProject |
51 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLRPC", "Common\XmlRpcCS\XMLRPC.csproj", "{8E81D43C-0000-0000-0000-000000000000}" | 51 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLRPC", "Common\XmlRpcCS\XMLRPC.csproj", "{8E81D43C-0000-0000-0000-000000000000}" |
52 | EndProject | 52 | EndProject |
53 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Communications.OGS1", "Common\OpenGrid.Framework.Communications.OGS1\OpenGrid.Framework.Communications.OGS1.csproj", "{C1F40DD4-A68B-4233-9142-CE236775A3CE}" | ||
54 | EndProject | ||
53 | Global | 55 | Global |
54 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 56 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
55 | Debug|Any CPU = Debug|Any CPU | 57 | Debug|Any CPU = Debug|Any CPU |
@@ -156,6 +158,10 @@ Global | |||
156 | {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU | 158 | {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU |
157 | {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU | 159 | {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU |
158 | {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU | 160 | {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU |
161 | {C1F40DD4-A68B-4233-9142-CE236775A3CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
162 | {C1F40DD4-A68B-4233-9142-CE236775A3CE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
163 | {C1F40DD4-A68B-4233-9142-CE236775A3CE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
164 | {C1F40DD4-A68B-4233-9142-CE236775A3CE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
159 | EndGlobalSection | 165 | EndGlobalSection |
160 | GlobalSection(SolutionProperties) = preSolution | 166 | GlobalSection(SolutionProperties) = preSolution |
161 | HideSolutionNode = FALSE | 167 | HideSolutionNode = FALSE |
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 | |||
51 | /// </summary> | 51 | /// </summary> |
52 | /// <param name="regionInfo"></param> | 52 | /// <param name="regionInfo"></param> |
53 | /// <returns></returns> | 53 | /// <returns></returns> |
54 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) | 54 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo) |
55 | { | 55 | { |
56 | //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); | 56 | //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); |
57 | if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) | 57 | 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 | |||
87 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | 87 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + |
88 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 88 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; |
89 | string capsPath = Util.GetRandomCapsPath(); | 89 | string capsPath = Util.GetRandomCapsPath(); |
90 | response.SimAddress = reg.IPListenAddr; | 90 | response.SimAddress = reg.CommsIPListenAddr; |
91 | response.SimPort = (Int32)reg.IPListenPort; | 91 | response.SimPort = (Int32)reg.CommsIPListenPort; |
92 | response.RegionX = reg.RegionLocX ; | 92 | response.RegionX = reg.RegionLocX ; |
93 | response.RegionY = reg.RegionLocY ; | 93 | response.RegionY = reg.RegionLocY ; |
94 | response.SeedCapability = "http://" + reg.IPListenAddr + ":" + "9000" + "/CAPS/"+capsPath +"0000/"; | 94 | response.SeedCapability = "http://" + reg.CommsIPListenAddr + ":" + "9000" + "/CAPS/" + capsPath + "0000/"; |
95 | theUser.currentAgent.currentRegion = reg.SimUUID; | 95 | theUser.currentAgent.currentRegion = reg.SimUUID; |
96 | theUser.currentAgent.currentHandle = reg.RegionHandle; | 96 | theUser.currentAgent.currentHandle = reg.RegionHandle; |
97 | 97 | ||
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 | |||
704 | /// </summary> | 704 | /// </summary> |
705 | public void RegisterRegionWithComms() | 705 | public void RegisterRegionWithComms() |
706 | { | 706 | { |
707 | this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo); | 707 | GridInfo gridSettings = new GridInfo(); |
708 | this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo,gridSettings); | ||
708 | if (this.regionCommsHost != null) | 709 | if (this.regionCommsHost != null) |
709 | { | 710 | { |
710 | this.regionCommsHost.OnExpectUser += new ExpectUserDelegate(this.NewUserConnection); | 711 | this.regionCommsHost.OnExpectUser += new ExpectUserDelegate(this.NewUserConnection); |
@@ -726,7 +727,7 @@ namespace OpenSim.Region.Scenes | |||
726 | if (agent.CapsPath != "") | 727 | if (agent.CapsPath != "") |
727 | { | 728 | { |
728 | //Console.WriteLine("new user, so creating caps handler for it"); | 729 | //Console.WriteLine("new user, so creating caps handler for it"); |
729 | Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.IPListenAddr, 9000, agent.CapsPath, agent.AgentID); | 730 | Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.CommsIPListenAddr, 9000, agent.CapsPath, agent.AgentID); |
730 | cap.RegisterHandlers(); | 731 | cap.RegisterHandlers(); |
731 | this.capsHandlers.Add(cap); | 732 | this.capsHandlers.Add(cap); |
732 | } | 733 | } |
@@ -765,7 +766,7 @@ namespace OpenSim.Region.Scenes | |||
765 | agent.startpos = new LLVector3(128, 128, 70); | 766 | agent.startpos = new LLVector3(128, 128, 70); |
766 | agent.child = true; | 767 | agent.child = true; |
767 | this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent); | 768 | this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent); |
768 | remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, System.Net.IPAddress.Parse(neighbours[i].IPListenAddr), (ushort)neighbours[i].IPListenPort); | 769 | remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr), (ushort)neighbours[i].CommsIPListenPort); |
769 | } | 770 | } |
770 | } | 771 | } |
771 | } | 772 | } |
@@ -826,7 +827,7 @@ namespace OpenSim.Region.Scenes | |||
826 | agent.child = true; | 827 | agent.child = true; |
827 | this.commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent); | 828 | this.commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent); |
828 | this.commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position); | 829 | this.commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position); |
829 | remoteClient.SendRegionTeleport(regionHandle, 13, reg.IPListenAddr, (ushort)reg.IPListenPort, 4, (1 << 4)); | 830 | remoteClient.SendRegionTeleport(regionHandle, 13, reg.CommsIPListenAddr, (ushort)reg.CommsIPListenPort, 4, (1 << 4)); |
830 | } | 831 | } |
831 | //remoteClient.SendTeleportCancel(); | 832 | //remoteClient.SendTeleportCancel(); |
832 | } | 833 | } |
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 | |||
444 | if (res) | 444 | if (res) |
445 | { | 445 | { |
446 | this.MakeChildAgent(); | 446 | this.MakeChildAgent(); |
447 | this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, System.Net.IPAddress.Parse(neighbourRegion.IPListenAddr), (ushort)neighbourRegion.IPListenPort); | 447 | this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, System.Net.IPAddress.Parse(neighbourRegion.CommsIPListenAddr), (ushort)neighbourRegion.CommsIPListenPort); |
448 | } | 448 | } |
449 | } | 449 | } |
450 | } | 450 | } |
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 | |||
233 | regionDat.InitConfig(this.m_sandbox, regionConfig); | 233 | regionDat.InitConfig(this.m_sandbox, regionConfig); |
234 | regionConfig.Close(); | 234 | regionConfig.Close(); |
235 | 235 | ||
236 | udpServer = new UDPServer(regionDat.IPListenPort, this.AssetCache, this.InventoryCache, this.m_log, authenBase); | 236 | udpServer = new UDPServer(regionDat.CommsIPListenPort, this.AssetCache, this.InventoryCache, this.m_log, authenBase); |
237 | 237 | ||
238 | m_udpServer.Add(udpServer); | 238 | m_udpServer.Add(udpServer); |
239 | this.regionData.Add(regionDat); | 239 | this.regionData.Add(regionDat); |