diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/GridService/HypergridLinker.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 1289cf6..cda7dae 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -214,8 +214,9 @@ namespace OpenSim.Services.GridService | |||
214 | // Finally, link it | 214 | // Finally, link it |
215 | ulong handle = 0; | 215 | ulong handle = 0; |
216 | UUID regionID = UUID.Zero; | 216 | UUID regionID = UUID.Zero; |
217 | string externalName = string.Empty; | ||
217 | string imageURL = string.Empty; | 218 | string imageURL = string.Empty; |
218 | if (!m_GatekeeperConnector.LinkRegion(regInfo, out regionID, out handle, out imageURL, out reason)) | 219 | if (!m_GatekeeperConnector.LinkRegion(regInfo, out regionID, out handle, out externalName, out imageURL, out reason)) |
219 | return false; | 220 | return false; |
220 | 221 | ||
221 | if (regionID != UUID.Zero) | 222 | if (regionID != UUID.Zero) |
@@ -229,11 +230,22 @@ namespace OpenSim.Services.GridService | |||
229 | } | 230 | } |
230 | 231 | ||
231 | regInfo.RegionID = regionID; | 232 | regInfo.RegionID = regionID; |
233 | Uri uri = null; | ||
234 | try | ||
235 | { | ||
236 | uri = new Uri(externalName); | ||
237 | regInfo.ExternalHostName = uri.Host; | ||
238 | regInfo.HttpPort = (uint)uri.Port; | ||
239 | } | ||
240 | catch | ||
241 | { | ||
242 | m_log.WarnFormat("[HYPERGRID LINKER]: Remote Gatekeeper at {0} provided malformed ExternalName {1}", regInfo.ExternalHostName, externalName); | ||
243 | } | ||
232 | regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort + ":" + regInfo.RegionName; | 244 | regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort + ":" + regInfo.RegionName; |
233 | // Try get the map image | 245 | // Try get the map image |
234 | regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL); | 246 | //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL); |
235 | // I need a texture that works for this... the one I tried doesn't seem to be working | 247 | // I need a texture that works for this... the one I tried doesn't seem to be working |
236 | //regInfo.TerrainImage = m_HGMapImage; | 248 | regInfo.TerrainImage = m_HGMapImage; |
237 | 249 | ||
238 | AddHyperlinkRegion(regInfo, handle); | 250 | AddHyperlinkRegion(regInfo, handle); |
239 | m_log.Info("[HYPERGRID LINKER]: Successfully linked to region_uuid " + regInfo.RegionID); | 251 | m_log.Info("[HYPERGRID LINKER]: Successfully linked to region_uuid " + regInfo.RegionID); |