aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/RegionInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/RegionInfo.cs31
1 files changed, 28 insertions, 3 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 949a289..73b8bd0 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -115,7 +115,13 @@ namespace OpenSim.Framework
115 /// </summary> 115 /// </summary>
116 public string ServerURI 116 public string ServerURI
117 { 117 {
118 get { return m_serverURI; } 118 get {
119 if ( m_serverURI != string.Empty ) {
120 return m_serverURI;
121 } else {
122 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
123 }
124 }
119 set { 125 set {
120 if ( value.EndsWith("/") ) { 126 if ( value.EndsWith("/") ) {
121 m_serverURI = value; 127 m_serverURI = value;
@@ -147,6 +153,7 @@ namespace OpenSim.Framework
147 153
148 public SimpleRegionInfo() 154 public SimpleRegionInfo()
149 { 155 {
156 m_serverURI = string.Empty;
150 } 157 }
151 158
152 public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 159 public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
@@ -156,6 +163,7 @@ namespace OpenSim.Framework
156 163
157 m_internalEndPoint = internalEndPoint; 164 m_internalEndPoint = internalEndPoint;
158 m_externalHostName = externalUri; 165 m_externalHostName = externalUri;
166 m_serverURI = string.Empty;
159 } 167 }
160 168
161 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port) 169 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port)
@@ -166,6 +174,7 @@ namespace OpenSim.Framework
166 m_externalHostName = externalUri; 174 m_externalHostName = externalUri;
167 175
168 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); 176 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
177 m_serverURI = string.Empty;
169 } 178 }
170 179
171 public SimpleRegionInfo(RegionInfo ConvertFrom) 180 public SimpleRegionInfo(RegionInfo ConvertFrom)
@@ -455,6 +464,7 @@ namespace OpenSim.Framework
455 configMember = 464 configMember =
456 new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); 465 new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig);
457 configMember.performConfigurationRetrieve(); 466 configMember.performConfigurationRetrieve();
467 m_serverURI = string.Empty;
458 } 468 }
459 469
460 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 470 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
@@ -464,10 +474,12 @@ namespace OpenSim.Framework
464 474
465 m_internalEndPoint = internalEndPoint; 475 m_internalEndPoint = internalEndPoint;
466 m_externalHostName = externalUri; 476 m_externalHostName = externalUri;
477 m_serverURI = string.Empty;
467 } 478 }
468 479
469 public RegionInfo() 480 public RegionInfo()
470 { 481 {
482 m_serverURI = string.Empty;
471 } 483 }
472 484
473 public EstateSettings EstateSettings 485 public EstateSettings EstateSettings
@@ -557,10 +569,23 @@ namespace OpenSim.Framework
557 /// <summary> 569 /// <summary>
558 /// A well-formed URI for the host region server (namely "http://" + ExternalHostName) 570 /// A well-formed URI for the host region server (namely "http://" + ExternalHostName)
559 /// </summary> 571 /// </summary>
572
560 public string ServerURI 573 public string ServerURI
561 { 574 {
562 get { return m_serverURI; } 575 get {
563 set { m_serverURI = value; } 576 if ( m_serverURI != string.Empty ) {
577 return m_serverURI;
578 } else {
579 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
580 }
581 }
582 set {
583 if ( value.EndsWith("/") ) {
584 m_serverURI = value;
585 } else {
586 m_serverURI = value + '/';
587 }
588 }
564 } 589 }
565 590
566 public string RegionName 591 public string RegionName