diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Framework/RegionInfo.cs')
-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 806142f..d154bff 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -117,8 +117,20 @@ namespace OpenSim.Framework | |||
117 | /// </summary> | 117 | /// </summary> |
118 | public string ServerURI | 118 | public string ServerURI |
119 | { | 119 | { |
120 | get { return m_serverURI; } | 120 | get { |
121 | set { m_serverURI = value; } | 121 | if ( m_serverURI != string.Empty ) { |
122 | return m_serverURI; | ||
123 | } else { | ||
124 | return "http://" + m_externalHostName + ":" + m_httpPort + "/"; | ||
125 | } | ||
126 | } | ||
127 | set { | ||
128 | if ( value.EndsWith("/") ) { | ||
129 | m_serverURI = value; | ||
130 | } else { | ||
131 | m_serverURI = value + '/'; | ||
132 | } | ||
133 | } | ||
122 | } | 134 | } |
123 | protected string m_serverURI; | 135 | protected string m_serverURI; |
124 | 136 | ||
@@ -143,6 +155,7 @@ namespace OpenSim.Framework | |||
143 | 155 | ||
144 | public SimpleRegionInfo() | 156 | public SimpleRegionInfo() |
145 | { | 157 | { |
158 | m_serverURI = string.Empty; | ||
146 | } | 159 | } |
147 | 160 | ||
148 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) | 161 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) |
@@ -152,6 +165,7 @@ namespace OpenSim.Framework | |||
152 | 165 | ||
153 | m_internalEndPoint = internalEndPoint; | 166 | m_internalEndPoint = internalEndPoint; |
154 | m_externalHostName = externalUri; | 167 | m_externalHostName = externalUri; |
168 | m_serverURI = string.Empty; | ||
155 | } | 169 | } |
156 | 170 | ||
157 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port) | 171 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port) |
@@ -162,6 +176,7 @@ namespace OpenSim.Framework | |||
162 | m_externalHostName = externalUri; | 176 | m_externalHostName = externalUri; |
163 | 177 | ||
164 | m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); | 178 | m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); |
179 | m_serverURI = string.Empty; | ||
165 | } | 180 | } |
166 | 181 | ||
167 | public SimpleRegionInfo(RegionInfo ConvertFrom) | 182 | public SimpleRegionInfo(RegionInfo ConvertFrom) |
@@ -451,6 +466,7 @@ namespace OpenSim.Framework | |||
451 | configMember = | 466 | configMember = |
452 | new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); | 467 | new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); |
453 | configMember.performConfigurationRetrieve(); | 468 | configMember.performConfigurationRetrieve(); |
469 | m_serverURI = string.Empty; | ||
454 | } | 470 | } |
455 | 471 | ||
456 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) | 472 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) |
@@ -460,10 +476,12 @@ namespace OpenSim.Framework | |||
460 | 476 | ||
461 | m_internalEndPoint = internalEndPoint; | 477 | m_internalEndPoint = internalEndPoint; |
462 | m_externalHostName = externalUri; | 478 | m_externalHostName = externalUri; |
479 | m_serverURI = string.Empty; | ||
463 | } | 480 | } |
464 | 481 | ||
465 | public RegionInfo() | 482 | public RegionInfo() |
466 | { | 483 | { |
484 | m_serverURI = string.Empty; | ||
467 | } | 485 | } |
468 | 486 | ||
469 | public EstateSettings EstateSettings | 487 | public EstateSettings EstateSettings |
@@ -553,10 +571,23 @@ namespace OpenSim.Framework | |||
553 | /// <summary> | 571 | /// <summary> |
554 | /// A well-formed URI for the host region server (namely "http://" + ExternalHostName) | 572 | /// A well-formed URI for the host region server (namely "http://" + ExternalHostName) |
555 | /// </summary> | 573 | /// </summary> |
574 | |||
556 | public string ServerURI | 575 | public string ServerURI |
557 | { | 576 | { |
558 | get { return m_serverURI; } | 577 | get { |
559 | set { m_serverURI = value; } | 578 | if ( m_serverURI != string.Empty ) { |
579 | return m_serverURI; | ||
580 | } else { | ||
581 | return "http://" + m_externalHostName + ":" + m_httpPort + "/"; | ||
582 | } | ||
583 | } | ||
584 | set { | ||
585 | if ( value.EndsWith("/") ) { | ||
586 | m_serverURI = value; | ||
587 | } else { | ||
588 | m_serverURI = value + '/'; | ||
589 | } | ||
590 | } | ||
560 | } | 591 | } |
561 | 592 | ||
562 | public string RegionName | 593 | public string RegionName |