aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorAdam Frisby2009-05-25 06:46:41 +0000
committerAdam Frisby2009-05-25 06:46:41 +0000
commita38285f7f9145fcacbfc27a5683d8463c095492e (patch)
tree85b941d383c44fedbed6ca18514eb80152b0aee3 /OpenSim
parentUpdate svn properties. (diff)
downloadopensim-SC_OLD-a38285f7f9145fcacbfc27a5683d8463c095492e.zip
opensim-SC_OLD-a38285f7f9145fcacbfc27a5683d8463c095492e.tar.gz
opensim-SC_OLD-a38285f7f9145fcacbfc27a5683d8463c095492e.tar.bz2
opensim-SC_OLD-a38285f7f9145fcacbfc27a5683d8463c095492e.tar.xz
* Attaches debug info to some DNS resolution code.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/RegionInfo.cs24
1 files changed, 16 insertions, 8 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 9ec7326..367db61 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -134,18 +134,26 @@ namespace OpenSim.Framework
134 134
135 // Reset for next check 135 // Reset for next check
136 ia = null; 136 ia = null;
137 137 try
138 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
139 { 138 {
140 if (ia == null) 139 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
141 ia = Adr;
142
143 if (Adr.AddressFamily == AddressFamily.InterNetwork)
144 { 140 {
145 ia = Adr; 141 if (ia == null)
146 break; 142 ia = Adr;
143
144 if (Adr.AddressFamily == AddressFamily.InterNetwork)
145 {
146 ia = Adr;
147 break;
148 }
147 } 149 }
148 } 150 }
151 catch (SocketException e)
152 {
153 throw new Exception(
154 "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" +
155 e + "' attached to this exception", e);
156 }
149 157
150 return new IPEndPoint(ia, m_internalEndPoint.Port); 158 return new IPEndPoint(ia, m_internalEndPoint.Port);
151 } 159 }