diff options
author | Jeff Ames | 2007-12-06 01:41:41 +0000 |
---|---|---|
committer | Jeff Ames | 2007-12-06 01:41:41 +0000 |
commit | 4bde56457f574060c1aaaca8effba1f6fe00b6c7 (patch) | |
tree | 60c081be8f3d00da63940efd81ce88de6fe1f2a5 /OpenSim/Region | |
parent | Some refactoring of the RestObjectPoster (and related classes). (diff) | |
download | opensim-SC_OLD-4bde56457f574060c1aaaca8effba1f6fe00b6c7.zip opensim-SC_OLD-4bde56457f574060c1aaaca8effba1f6fe00b6c7.tar.gz opensim-SC_OLD-4bde56457f574060c1aaaca8effba1f6fe00b6c7.tar.bz2 opensim-SC_OLD-4bde56457f574060c1aaaca8effba1f6fe00b6c7.tar.xz |
removed some duplicate hard-coded port numbers. changed ports to uint.
Diffstat (limited to 'OpenSim/Region')
6 files changed, 14 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 5b43fec..53ed2ab 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim.Region.ClientStack | |||
49 | protected NetworkServersInfo m_networkServersInfo; | 49 | protected NetworkServersInfo m_networkServersInfo; |
50 | 50 | ||
51 | protected BaseHttpServer m_httpServer; | 51 | protected BaseHttpServer m_httpServer; |
52 | protected int m_httpServerPort; | 52 | protected uint m_httpServerPort; |
53 | 53 | ||
54 | protected LogBase m_log; | 54 | protected LogBase m_log; |
55 | protected CommunicationsManager m_commsManager; | 55 | protected CommunicationsManager m_commsManager; |
@@ -106,7 +106,7 @@ namespace OpenSim.Region.ClientStack | |||
106 | protected Scene SetupScene(RegionInfo regionInfo, out UDPServer udpServer, bool m_permissions) | 106 | protected Scene SetupScene(RegionInfo regionInfo, out UDPServer udpServer, bool m_permissions) |
107 | { | 107 | { |
108 | AgentCircuitManager circuitManager = new AgentCircuitManager(); | 108 | AgentCircuitManager circuitManager = new AgentCircuitManager(); |
109 | udpServer = new UDPServer(regionInfo.InternalEndPoint.Port, m_assetCache, m_log, circuitManager); | 109 | udpServer = new UDPServer((uint) regionInfo.InternalEndPoint.Port, m_assetCache, m_log, circuitManager); |
110 | 110 | ||
111 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); | 111 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); |
112 | 112 | ||
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index b0586a3..aaf7224 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim.Region.ClientStack | |||
49 | protected PacketServer m_packetServer; | 49 | protected PacketServer m_packetServer; |
50 | protected ulong m_regionHandle; | 50 | protected ulong m_regionHandle; |
51 | 51 | ||
52 | protected int listenPort; | 52 | protected uint listenPort; |
53 | protected IScene m_localScene; | 53 | protected IScene m_localScene; |
54 | protected AssetCache m_assetCache; | 54 | protected AssetCache m_assetCache; |
55 | protected LogBase m_log; | 55 | protected LogBase m_log; |
@@ -83,7 +83,7 @@ namespace OpenSim.Region.ClientStack | |||
83 | { | 83 | { |
84 | } | 84 | } |
85 | 85 | ||
86 | public UDPServer(int port, AssetCache assetCache, LogBase console, AgentCircuitManager authenticateClass) | 86 | public UDPServer(uint port, AssetCache assetCache, LogBase console, AgentCircuitManager authenticateClass) |
87 | { | 87 | { |
88 | listenPort = port; | 88 | listenPort = port; |
89 | m_assetCache = assetCache; | 89 | m_assetCache = assetCache; |
@@ -180,9 +180,9 @@ namespace OpenSim.Region.ClientStack | |||
180 | 180 | ||
181 | public void ServerListener() | 181 | public void ServerListener() |
182 | { | 182 | { |
183 | m_log.Verbose("SERVER", "Opening UDP socket on " + listenPort); | 183 | m_log.Verbose("SERVER", "Opening UDP socket on " + listenPort.ToString()); |
184 | 184 | ||
185 | ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort); | 185 | ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) listenPort); |
186 | Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); | 186 | Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); |
187 | Server.Bind(ServerIncoming); | 187 | Server.Bind(ServerIncoming); |
188 | 188 | ||
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index eef6ed4..103c76f 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -121,11 +121,10 @@ namespace OpenSim.Region.Communications.Local | |||
121 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 121 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; |
122 | string capsPath = Util.GetRandomCapsPath(); | 122 | string capsPath = Util.GetRandomCapsPath(); |
123 | response.SimAddress = reg.ExternalEndPoint.Address.ToString(); | 123 | response.SimAddress = reg.ExternalEndPoint.Address.ToString(); |
124 | response.SimPort = (Int32) reg.ExternalEndPoint.Port; | 124 | response.SimPort = (uint) reg.ExternalEndPoint.Port; |
125 | response.RegionX = reg.RegionLocX; | 125 | response.RegionX = reg.RegionLocX; |
126 | response.RegionY = reg.RegionLocY; | 126 | response.RegionY = reg.RegionLocY; |
127 | 127 | ||
128 | |||
129 | response.SeedCapability = "http://" + reg.ExternalHostName + ":" + | 128 | response.SeedCapability = "http://" + reg.ExternalHostName + ":" + |
130 | serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; | 129 | serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; |
131 | // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/"; | 130 | // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/"; |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index b11a91f..353dc28 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -166,7 +166,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
166 | { | 166 | { |
167 | string simIp = (string) neighbourData["sim_ip"]; | 167 | string simIp = (string) neighbourData["sim_ip"]; |
168 | 168 | ||
169 | int port = Convert.ToInt32(neighbourData["sim_port"]); | 169 | uint port = Convert.ToUInt32(neighbourData["sim_port"]); |
170 | string externalUri = (string) neighbourData["sim_uri"]; | 170 | string externalUri = (string) neighbourData["sim_uri"]; |
171 | 171 | ||
172 | string externalIpStr = Util.GetHostFromDNS(simIp).ToString(); | 172 | string externalIpStr = Util.GetHostFromDNS(simIp).ToString(); |
@@ -450,7 +450,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
450 | /// </summary> | 450 | /// </summary> |
451 | private void StartRemoting() | 451 | private void StartRemoting() |
452 | { | 452 | { |
453 | TcpChannel ch = new TcpChannel(NetworkServersInfo.RemotingListenerPort); | 453 | TcpChannel ch = new TcpChannel((int) NetworkServersInfo.RemotingListenerPort); |
454 | ChannelServices.RegisterChannel(ch, false); // Disabled security as Mono doesnt support this. | 454 | ChannelServices.RegisterChannel(ch, false); // Disabled security as Mono doesnt support this. |
455 | 455 | ||
456 | WellKnownServiceTypeEntry wellType = | 456 | WellKnownServiceTypeEntry wellType = |
@@ -559,7 +559,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
559 | // it's own remoting port! How special. | 559 | // it's own remoting port! How special. |
560 | region = new SearializableRegionInfo(RequestNeighbourInfo(region.RegionHandle)); | 560 | region = new SearializableRegionInfo(RequestNeighbourInfo(region.RegionHandle)); |
561 | region.RemotingAddress = region.ExternalHostName; | 561 | region.RemotingAddress = region.ExternalHostName; |
562 | region.RemotingPort = (uint) NetworkServersInfo.RemotingListenerPort; | 562 | region.RemotingPort = NetworkServersInfo.RemotingListenerPort; |
563 | if (m_localBackend.RegionUp(region,regionhandle)) | 563 | if (m_localBackend.RegionUp(region,regionhandle)) |
564 | { | 564 | { |
565 | return true; | 565 | return true; |
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index be38baf..c93804f 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -265,7 +265,7 @@ namespace OpenSim.Region.Environment.Modules | |||
265 | internal class IRCChatModule | 265 | internal class IRCChatModule |
266 | { | 266 | { |
267 | private string m_server = null; | 267 | private string m_server = null; |
268 | private int m_port = 6668; | 268 | private uint m_port = 6668; |
269 | private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; | 269 | private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; |
270 | private string m_nick = null; | 270 | private string m_nick = null; |
271 | private string m_channel = null; | 271 | private string m_channel = null; |
@@ -296,7 +296,7 @@ namespace OpenSim.Region.Environment.Modules | |||
296 | m_server = config.Configs["IRC"].GetString("server"); | 296 | m_server = config.Configs["IRC"].GetString("server"); |
297 | m_nick = config.Configs["IRC"].GetString("nick"); | 297 | m_nick = config.Configs["IRC"].GetString("nick"); |
298 | m_channel = config.Configs["IRC"].GetString("channel"); | 298 | m_channel = config.Configs["IRC"].GetString("channel"); |
299 | m_port = config.Configs["IRC"].GetInt("port", m_port); | 299 | m_port = (uint) config.Configs["IRC"].GetInt("port", (int) m_port); |
300 | m_user = config.Configs["IRC"].GetString("username", m_user); | 300 | m_user = config.Configs["IRC"].GetString("username", m_user); |
301 | if (m_server != null && m_nick != null && m_channel != null) | 301 | if (m_server != null && m_nick != null && m_channel != null) |
302 | { | 302 | { |
@@ -316,7 +316,7 @@ namespace OpenSim.Region.Environment.Modules | |||
316 | { | 316 | { |
317 | m_scenes = scenes; | 317 | m_scenes = scenes; |
318 | 318 | ||
319 | m_tcp = new TcpClient(m_server, m_port); | 319 | m_tcp = new TcpClient(m_server, (int) m_port); |
320 | m_log.Verbose("IRC", "Connecting..."); | 320 | m_log.Verbose("IRC", "Connecting..."); |
321 | m_stream = m_tcp.GetStream(); | 321 | m_stream = m_tcp.GetStream(); |
322 | m_log.Verbose("IRC", "Connected to " + m_server); | 322 | m_log.Verbose("IRC", "Connected to " + m_server); |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 9e5ca9b..16dcd7b 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -90,7 +90,7 @@ namespace SimpleApp | |||
90 | m_log.Notice(m_log.LineInfo); | 90 | m_log.Notice(m_log.LineInfo); |
91 | 91 | ||
92 | IPEndPoint internalEndPoint = | 92 | IPEndPoint internalEndPoint = |
93 | new IPEndPoint(IPAddress.Parse("127.0.0.1"), m_networkServersInfo.HttpListenerPort); | 93 | new IPEndPoint(IPAddress.Parse("127.0.0.1"), (int) m_networkServersInfo.HttpListenerPort); |
94 | 94 | ||
95 | RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost"); | 95 | RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost"); |
96 | regionInfo.DataStore = "simpleapp_datastore.yap"; | 96 | regionInfo.DataStore = "simpleapp_datastore.yap"; |