aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJeff Ames2007-12-06 01:41:41 +0000
committerJeff Ames2007-12-06 01:41:41 +0000
commit4bde56457f574060c1aaaca8effba1f6fe00b6c7 (patch)
tree60c081be8f3d00da63940efd81ce88de6fe1f2a5 /OpenSim/Framework
parentSome refactoring of the RestObjectPoster (and related classes). (diff)
downloadopensim-SC-4bde56457f574060c1aaaca8effba1f6fe00b6c7.zip
opensim-SC-4bde56457f574060c1aaaca8effba1f6fe00b6c7.tar.gz
opensim-SC-4bde56457f574060c1aaaca8effba1f6fe00b6c7.tar.bz2
opensim-SC-4bde56457f574060c1aaaca8effba1f6fe00b6c7.tar.xz
removed some duplicate hard-coded port numbers. changed ports to uint.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs4
-rw-r--r--OpenSim/Framework/Communications/LoginResponse.cs4
-rw-r--r--OpenSim/Framework/Console/LogBase.cs6
-rw-r--r--OpenSim/Framework/InventoryConfig.cs4
-rw-r--r--OpenSim/Framework/NetworkServersInfo.cs10
-rw-r--r--OpenSim/Framework/RegionInfo.cs7
-rw-r--r--OpenSim/Framework/SerializableRegionInfo.cs6
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs8
-rw-r--r--OpenSim/Framework/UserConfig.cs2
9 files changed, 24 insertions, 27 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 51a4598..4603280 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Capabilities
50 public class Caps 50 public class Caps
51 { 51 {
52 private string m_httpListenerHostName; 52 private string m_httpListenerHostName;
53 private int m_httpListenPort; 53 private uint m_httpListenPort;
54 private string m_capsObjectPath = "00001-"; 54 private string m_capsObjectPath = "00001-";
55 private string m_requestPath = "0000/"; 55 private string m_requestPath = "0000/";
56 private string m_mapLayerPath = "0001/"; 56 private string m_mapLayerPath = "0001/";
@@ -68,7 +68,7 @@ namespace OpenSim.Region.Capabilities
68 public NewInventoryItem AddNewInventoryItem = null; 68 public NewInventoryItem AddNewInventoryItem = null;
69 public ItemUpdatedCallback ItemUpdatedCall = null; 69 public ItemUpdatedCallback ItemUpdatedCall = null;
70 70
71 public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, int httpPort, string capsPath, 71 public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
72 LLUUID agent, bool dumpAssetsToFile) 72 LLUUID agent, bool dumpAssetsToFile)
73 { 73 {
74 m_assetCache = assetCache; 74 m_assetCache = assetCache;
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index dccba1c..bce518b 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Framework.UserManagement
70 private string gendered; 70 private string gendered;
71 private string everLoggedIn; 71 private string everLoggedIn;
72 private string login; 72 private string login;
73 private int simPort; 73 private uint simPort;
74 private string simAddress; 74 private string simAddress;
75 private string agentAccess; 75 private string agentAccess;
76 private Int32 circuitCode; 76 private Int32 circuitCode;
@@ -369,7 +369,7 @@ namespace OpenSim.Framework.UserManagement
369 set { everLoggedIn = value; } 369 set { everLoggedIn = value; }
370 } // EverLoggedIn 370 } // EverLoggedIn
371 371
372 public int SimPort 372 public uint SimPort
373 { 373 {
374 get { return simPort; } 374 get { return simPort; }
375 set { simPort = value; } 375 set { simPort = value; }
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
index 99c0128..c226fcb 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -345,15 +345,15 @@ namespace OpenSim.Framework.Console
345 return address; 345 return address;
346 } 346 }
347 347
348 public int CmdPromptIPPort(string prompt, string defaultvalue) 348 public uint CmdPromptIPPort(string prompt, string defaultvalue)
349 { 349 {
350 int port; 350 uint port;
351 string portStr; 351 string portStr;
352 352
353 while (true) 353 while (true)
354 { 354 {
355 portStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue); 355 portStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue);
356 if (int.TryParse(portStr, out port)) 356 if (uint.TryParse(portStr, out port))
357 { 357 {
358 if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort) 358 if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort)
359 { 359 {
diff --git a/OpenSim/Framework/InventoryConfig.cs b/OpenSim/Framework/InventoryConfig.cs
index 554cd30..87731a5 100644
--- a/OpenSim/Framework/InventoryConfig.cs
+++ b/OpenSim/Framework/InventoryConfig.cs
@@ -13,7 +13,7 @@ namespace OpenSim.Framework
13 public string DatabaseProvider = ""; 13 public string DatabaseProvider = "";
14 public static uint DefaultHttpPort = 8004; 14 public static uint DefaultHttpPort = 8004;
15 15
16 public int HttpPort = 8004; 16 public uint HttpPort = DefaultHttpPort;
17 17
18 private ConfigurationMember configMember; 18 private ConfigurationMember configMember;
19 19
@@ -63,7 +63,7 @@ namespace OpenSim.Framework
63 DatabaseProvider = (string) configuration_result; 63 DatabaseProvider = (string) configuration_result;
64 break; 64 break;
65 case "http_port": 65 case "http_port":
66 HttpPort = (int) configuration_result; 66 HttpPort = (uint) configuration_result;
67 break; 67 break;
68 } 68 }
69 69
diff --git a/OpenSim/Framework/NetworkServersInfo.cs b/OpenSim/Framework/NetworkServersInfo.cs
index 1c76320..b3e79b7 100644
--- a/OpenSim/Framework/NetworkServersInfo.cs
+++ b/OpenSim/Framework/NetworkServersInfo.cs
@@ -45,10 +45,10 @@ namespace OpenSim.Framework
45 45
46 public string InventoryURL = ""; 46 public string InventoryURL = "";
47 47
48 public static int DefaultHttpListenerPort = 9000; 48 public static uint DefaultHttpListenerPort = 9000;
49 public int HttpListenerPort = DefaultHttpListenerPort; 49 public uint HttpListenerPort = DefaultHttpListenerPort;
50 50
51 public static int RemotingListenerPort = 8895; 51 public static uint RemotingListenerPort = 8895;
52 52
53 53
54 public NetworkServersInfo() 54 public NetworkServersInfo()
@@ -80,8 +80,8 @@ namespace OpenSim.Framework
80 m_defaultHomeLocX = (uint) config.Configs["StandAlone"].GetInt("default_location_x", 1000); 80 m_defaultHomeLocX = (uint) config.Configs["StandAlone"].GetInt("default_location_x", 1000);
81 m_defaultHomeLocY = (uint) config.Configs["StandAlone"].GetInt("default_location_y", 1000); 81 m_defaultHomeLocY = (uint) config.Configs["StandAlone"].GetInt("default_location_y", 1000);
82 82
83 HttpListenerPort = config.Configs["Network"].GetInt("http_listener_port", DefaultHttpListenerPort); 83 HttpListenerPort = (uint) config.Configs["Network"].GetInt("http_listener_port", (int) DefaultHttpListenerPort);
84 RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", RemotingListenerPort); 84 RemotingListenerPort = (uint) config.Configs["Network"].GetInt("remoting_listener_port", (int) RemotingListenerPort);
85 GridURL = 85 GridURL =
86 config.Configs["Network"].GetString("grid_server_url", 86 config.Configs["Network"].GetString("grid_server_url",
87 "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString()); 87 "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString());
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index dd4078b..d94a890 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -56,15 +56,14 @@ namespace OpenSim.Framework
56 m_externalHostName = externalUri; 56 m_externalHostName = externalUri;
57 } 57 }
58 58
59 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port) 59 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port)
60 { 60 {
61
62 m_regionLocX = regionLocX; 61 m_regionLocX = regionLocX;
63 m_regionLocY = regionLocY; 62 m_regionLocY = regionLocY;
64 63
65 m_externalHostName = externalUri; 64 m_externalHostName = externalUri;
66 65
67 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port); 66 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
68 } 67 }
69 68
70 public LLUUID RegionID = LLUUID.Zero; 69 public LLUUID RegionID = LLUUID.Zero;
@@ -270,7 +269,7 @@ namespace OpenSim.Framework
270 { 269 {
271 errorMessage = "needs an IP Address (IPAddress)"; 270 errorMessage = "needs an IP Address (IPAddress)";
272 } 271 }
273 this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", NetworkServersInfo.DefaultHttpListenerPort); 272 this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", (int) NetworkServersInfo.DefaultHttpListenerPort);
274 273
275 string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); 274 string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1");
276 if (externalHost != "SYSTEMIP") 275 if (externalHost != "SYSTEMIP")
diff --git a/OpenSim/Framework/SerializableRegionInfo.cs b/OpenSim/Framework/SerializableRegionInfo.cs
index dc440b6..c7e7d27 100644
--- a/OpenSim/Framework/SerializableRegionInfo.cs
+++ b/OpenSim/Framework/SerializableRegionInfo.cs
@@ -51,7 +51,6 @@ namespace OpenSim.Framework
51 m_externalHostName = ConvertFrom.ExternalHostName; 51 m_externalHostName = ConvertFrom.ExternalHostName;
52 m_remotingPort = ConvertFrom.RemotingPort; 52 m_remotingPort = ConvertFrom.RemotingPort;
53 RemotingAddress = ConvertFrom.RemotingAddress; 53 RemotingAddress = ConvertFrom.RemotingAddress;
54
55 } 54 }
56 public SearializableRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 55 public SearializableRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
57 { 56 {
@@ -63,15 +62,14 @@ namespace OpenSim.Framework
63 m_externalHostName = externalUri; 62 m_externalHostName = externalUri;
64 } 63 }
65 64
66 public SearializableRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port) 65 public SearializableRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port)
67 { 66 {
68
69 m_regionLocX = regionLocX; 67 m_regionLocX = regionLocX;
70 m_regionLocY = regionLocY; 68 m_regionLocY = regionLocY;
71 69
72 m_externalHostName = externalUri; 70 m_externalHostName = externalUri;
73 71
74 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port); 72 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
75 } 73 }
76 74
77 public LLUUID RegionID = LLUUID.Zero; 75 public LLUUID RegionID = LLUUID.Zero;
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 889eaef..1baf073 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -44,21 +44,21 @@ namespace OpenSim.Framework.Servers
44 protected HttpListener m_httpListener; 44 protected HttpListener m_httpListener;
45 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); 45 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
46 protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>(); 46 protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>();
47 protected int m_port; 47 protected uint m_port;
48 protected bool m_ssl = false; 48 protected bool m_ssl = false;
49 protected bool m_firstcaps = true; 49 protected bool m_firstcaps = true;
50 50
51 public int Port 51 public uint Port
52 { 52 {
53 get { return m_port; } 53 get { return m_port; }
54 } 54 }
55 55
56 public BaseHttpServer(int port) 56 public BaseHttpServer(uint port)
57 { 57 {
58 m_port = port; 58 m_port = port;
59 } 59 }
60 60
61 public BaseHttpServer(int port, bool ssl) 61 public BaseHttpServer(uint port, bool ssl)
62 { 62 {
63 m_ssl = ssl; 63 m_ssl = ssl;
64 m_port = port; 64 m_port = port;
diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs
index 1cc00c7..39b1599 100644
--- a/OpenSim/Framework/UserConfig.cs
+++ b/OpenSim/Framework/UserConfig.cs
@@ -76,7 +76,7 @@ namespace OpenSim.Framework
76 configMember.addConfigurationOption("default_inventory_server", 76 configMember.addConfigurationOption("default_inventory_server",
77 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 77 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
78 "Default Inventory Server URI", 78 "Default Inventory Server URI",
79 "http://127.0.0.1:8004/", false); 79 "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString() + "/", false);
80 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 80 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
81 "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); 81 "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
82 82