diff options
author | Diva Canto | 2010-08-10 11:14:24 -0700 |
---|---|---|
committer | Diva Canto | 2010-08-10 11:17:38 -0700 |
commit | 7741143fb5c7c62355170a2f795561d28b9f589f (patch) | |
tree | 8dde2965ca0a31ad6658cb90750ae2e5e87320ee /OpenSim | |
parent | Even if all data migratios are up to date, still print the current revision t... (diff) | |
download | opensim-SC-7741143fb5c7c62355170a2f795561d28b9f589f.zip opensim-SC-7741143fb5c7c62355170a2f795561d28b9f589f.tar.gz opensim-SC-7741143fb5c7c62355170a2f795561d28b9f589f.tar.bz2 opensim-SC-7741143fb5c7c62355170a2f795561d28b9f589f.tar.xz |
Enforce DB limits on region name to 32 chars, or else (not good). Removed a piece of code from Hyperlinker that didn't work anyway. Shortened the hyperlink region name.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 3 | ||||
-rw-r--r-- | OpenSim/Services/GridService/HypergridLinker.cs | 25 |
2 files changed, 5 insertions, 23 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 878b8e8..baa948e 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -210,6 +210,9 @@ namespace OpenSim.Data.MySQL | |||
210 | if (data.Data.ContainsKey("locY")) | 210 | if (data.Data.ContainsKey("locY")) |
211 | data.Data.Remove("locY"); | 211 | data.Data.Remove("locY"); |
212 | 212 | ||
213 | if (data.RegionName.Length > 32) | ||
214 | data.RegionName = data.RegionName.Substring(0, 32); | ||
215 | |||
213 | string[] fields = new List<string>(data.Data.Keys).ToArray(); | 216 | string[] fields = new List<string>(data.Data.Keys).ToArray(); |
214 | 217 | ||
215 | using (MySqlCommand cmd = new MySqlCommand()) | 218 | using (MySqlCommand cmd = new MySqlCommand()) |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index b190f93..3d722ec 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -247,21 +247,8 @@ namespace OpenSim.Services.GridService | |||
247 | } | 247 | } |
248 | 248 | ||
249 | regInfo.RegionID = regionID; | 249 | regInfo.RegionID = regionID; |
250 | Uri uri = null; | 250 | if (regInfo.RegionName == string.Empty) |
251 | try | 251 | regInfo.RegionName = regInfo.ExternalHostName; |
252 | { | ||
253 | uri = new Uri(externalName); | ||
254 | regInfo.ExternalHostName = uri.Host; | ||
255 | regInfo.HttpPort = (uint)uri.Port; | ||
256 | } | ||
257 | catch | ||
258 | { | ||
259 | m_log.WarnFormat("[HYPERGRID LINKER]: Remote Gatekeeper at {0} provided malformed ExternalName {1}", regInfo.ExternalHostName, externalName); | ||
260 | } | ||
261 | string name = regInfo.RegionName; | ||
262 | regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort; | ||
263 | if (name != string.Empty) | ||
264 | regInfo.RegionName += ":" + name; | ||
265 | 252 | ||
266 | // Try get the map image | 253 | // Try get the map image |
267 | //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL); | 254 | //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL); |
@@ -384,8 +371,6 @@ namespace OpenSim.Services.GridService | |||
384 | 371 | ||
385 | private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle) | 372 | private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle) |
386 | { | 373 | { |
387 | //m_HyperlinkRegions[regionInfo.RegionID] = regionInfo; | ||
388 | //m_HyperlinkHandles[regionInfo.RegionID] = regionHandle; | ||
389 | 374 | ||
390 | RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo); | 375 | RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo); |
391 | int flags = (int)OpenSim.Data.RegionFlags.Hyperlink + (int)OpenSim.Data.RegionFlags.NoDirectLogin + (int)OpenSim.Data.RegionFlags.RegionOnline; | 376 | int flags = (int)OpenSim.Data.RegionFlags.Hyperlink + (int)OpenSim.Data.RegionFlags.NoDirectLogin + (int)OpenSim.Data.RegionFlags.RegionOnline; |
@@ -397,12 +382,6 @@ namespace OpenSim.Services.GridService | |||
397 | 382 | ||
398 | private void RemoveHyperlinkRegion(UUID regionID) | 383 | private void RemoveHyperlinkRegion(UUID regionID) |
399 | { | 384 | { |
400 | //// Try the hyperlink collection | ||
401 | //if (m_HyperlinkRegions.ContainsKey(regionID)) | ||
402 | //{ | ||
403 | // m_HyperlinkRegions.Remove(regionID); | ||
404 | // m_HyperlinkHandles.Remove(regionID); | ||
405 | //} | ||
406 | m_Database.Delete(regionID); | 385 | m_Database.Delete(regionID); |
407 | } | 386 | } |
408 | 387 | ||