diff options
author | Melanie | 2010-10-21 07:33:01 +0100 |
---|---|---|
committer | Melanie | 2010-10-21 07:33:01 +0100 |
commit | fc33d569cd760b0ecf2d487b8d91d4ac3c53d08e (patch) | |
tree | ffe3d70e95b159dc4c7b3bf9613bca865d4067d3 /OpenSim/Framework/RegionInfo.cs | |
parent | COmmented the wrong line instead, now I commented them all to be on the safe ... (diff) | |
parent | Skip empty strings in ParseString* functions (diff) | |
download | opensim-SC-fc33d569cd760b0ecf2d487b8d91d4ac3c53d08e.zip opensim-SC-fc33d569cd760b0ecf2d487b8d91d4ac3c53d08e.tar.gz opensim-SC-fc33d569cd760b0ecf2d487b8d91d4ac3c53d08e.tar.bz2 opensim-SC-fc33d569cd760b0ecf2d487b8d91d4ac3c53d08e.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index a006f3e..d57d4e9 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -116,8 +116,20 @@ namespace OpenSim.Framework | |||
116 | /// </summary> | 116 | /// </summary> |
117 | public string ServerURI | 117 | public string ServerURI |
118 | { | 118 | { |
119 | get { return m_serverURI; } | 119 | get { |
120 | set { m_serverURI = value; } | 120 | if ( m_serverURI != string.Empty ) { |
121 | return m_serverURI; | ||
122 | } else { | ||
123 | return "http://" + m_externalHostName + ":" + m_httpPort + "/"; | ||
124 | } | ||
125 | } | ||
126 | set { | ||
127 | if ( value.EndsWith("/") ) { | ||
128 | m_serverURI = value; | ||
129 | } else { | ||
130 | m_serverURI = value + '/'; | ||
131 | } | ||
132 | } | ||
121 | } | 133 | } |
122 | protected string m_serverURI; | 134 | protected string m_serverURI; |
123 | 135 | ||
@@ -142,6 +154,7 @@ namespace OpenSim.Framework | |||
142 | 154 | ||
143 | public SimpleRegionInfo() | 155 | public SimpleRegionInfo() |
144 | { | 156 | { |
157 | m_serverURI = string.Empty; | ||
145 | } | 158 | } |
146 | 159 | ||
147 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) | 160 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) |
@@ -151,6 +164,7 @@ namespace OpenSim.Framework | |||
151 | 164 | ||
152 | m_internalEndPoint = internalEndPoint; | 165 | m_internalEndPoint = internalEndPoint; |
153 | m_externalHostName = externalUri; | 166 | m_externalHostName = externalUri; |
167 | m_serverURI = string.Empty; | ||
154 | } | 168 | } |
155 | 169 | ||
156 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port) | 170 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port) |
@@ -161,6 +175,7 @@ namespace OpenSim.Framework | |||
161 | m_externalHostName = externalUri; | 175 | m_externalHostName = externalUri; |
162 | 176 | ||
163 | m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); | 177 | m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); |
178 | m_serverURI = string.Empty; | ||
164 | } | 179 | } |
165 | 180 | ||
166 | public SimpleRegionInfo(RegionInfo ConvertFrom) | 181 | public SimpleRegionInfo(RegionInfo ConvertFrom) |
@@ -450,6 +465,7 @@ namespace OpenSim.Framework | |||
450 | configMember = | 465 | configMember = |
451 | new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); | 466 | new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); |
452 | configMember.performConfigurationRetrieve(); | 467 | configMember.performConfigurationRetrieve(); |
468 | m_serverURI = string.Empty; | ||
453 | } | 469 | } |
454 | 470 | ||
455 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) | 471 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) |
@@ -459,10 +475,12 @@ namespace OpenSim.Framework | |||
459 | 475 | ||
460 | m_internalEndPoint = internalEndPoint; | 476 | m_internalEndPoint = internalEndPoint; |
461 | m_externalHostName = externalUri; | 477 | m_externalHostName = externalUri; |
478 | m_serverURI = string.Empty; | ||
462 | } | 479 | } |
463 | 480 | ||
464 | public RegionInfo() | 481 | public RegionInfo() |
465 | { | 482 | { |
483 | m_serverURI = string.Empty; | ||
466 | } | 484 | } |
467 | 485 | ||
468 | public EstateSettings EstateSettings | 486 | public EstateSettings EstateSettings |
@@ -552,10 +570,23 @@ namespace OpenSim.Framework | |||
552 | /// <summary> | 570 | /// <summary> |
553 | /// A well-formed URI for the host region server (namely "http://" + ExternalHostName) | 571 | /// A well-formed URI for the host region server (namely "http://" + ExternalHostName) |
554 | /// </summary> | 572 | /// </summary> |
573 | |||
555 | public string ServerURI | 574 | public string ServerURI |
556 | { | 575 | { |
557 | get { return m_serverURI; } | 576 | get { |
558 | set { m_serverURI = value; } | 577 | if ( m_serverURI != string.Empty ) { |
578 | return m_serverURI; | ||
579 | } else { | ||
580 | return "http://" + m_externalHostName + ":" + m_httpPort + "/"; | ||
581 | } | ||
582 | } | ||
583 | set { | ||
584 | if ( value.EndsWith("/") ) { | ||
585 | m_serverURI = value; | ||
586 | } else { | ||
587 | m_serverURI = value + '/'; | ||
588 | } | ||
589 | } | ||
559 | } | 590 | } |
560 | 591 | ||
561 | public string RegionName | 592 | public string RegionName |