aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2011-03-28 16:46:04 -0700
committerDiva Canto2011-03-28 16:46:04 -0700
commit2d209d3844a58a4d27fe15aa5ccd497bbd530707 (patch)
treee0267f0e6376b1af3492ad49c82d08e55027f0ca /OpenSim
parentThe actual change to README.txt about running on Linux. (diff)
downloadopensim-SC_OLD-2d209d3844a58a4d27fe15aa5ccd497bbd530707.zip
opensim-SC_OLD-2d209d3844a58a4d27fe15aa5ccd497bbd530707.tar.gz
opensim-SC_OLD-2d209d3844a58a4d27fe15aa5ccd497bbd530707.tar.bz2
opensim-SC_OLD-2d209d3844a58a4d27fe15aa5ccd497bbd530707.tar.xz
Fix mantis #5413. WARNING: new config variable in section [GridService] of the simulators called Gatekeeper -- intended to have the URL of the grid's Gatekeeper service (so that it can be checked against). See ini.examples.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs6
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs10
2 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
index 7bb7544..f9ef286 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
@@ -100,8 +100,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
100 // service wasn't available; maybe still an old GridServer. Try the old API, though it will return only one region 100 // service wasn't available; maybe still an old GridServer. Try the old API, though it will return only one region
101 regionInfos = new List<GridRegion>(); 101 regionInfos = new List<GridRegion>();
102 GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName); 102 GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName);
103 if (info != null) regionInfos.Add(info); 103 if (info != null)
104 regionInfos.Add(info);
104 } 105 }
106 else if (regionInfos.Count == 0 && mapName.StartsWith("http://"))
107 remoteClient.SendAlertMessage("Hyperlink could not be established.");
108
105 m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count); 109 m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count);
106 List<MapBlockData> blocks = new List<MapBlockData>(); 110 List<MapBlockData> blocks = new List<MapBlockData>();
107 111
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index 12ea453..585d088 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -65,6 +65,7 @@ namespace OpenSim.Services.GridService
65 protected UUID m_ScopeID = UUID.Zero; 65 protected UUID m_ScopeID = UUID.Zero;
66 protected bool m_Check4096 = true; 66 protected bool m_Check4096 = true;
67 protected string m_MapTileDirectory = string.Empty; 67 protected string m_MapTileDirectory = string.Empty;
68 protected string m_ThisGatekeeper = string.Empty;
68 69
69 // Hyperlink regions are hyperlinks on the map 70 // Hyperlink regions are hyperlinks on the map
70 public readonly Dictionary<UUID, GridRegion> m_HyperlinkRegions = new Dictionary<UUID, GridRegion>(); 71 public readonly Dictionary<UUID, GridRegion> m_HyperlinkRegions = new Dictionary<UUID, GridRegion>();
@@ -123,6 +124,8 @@ namespace OpenSim.Services.GridService
123 124
124 m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); 125 m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles");
125 126
127 m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty);
128
126 m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService); 129 m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
127 130
128 m_log.Debug("[HYPERGRID LINKER]: Loaded all services..."); 131 m_log.Debug("[HYPERGRID LINKER]: Loaded all services...");
@@ -266,6 +269,13 @@ namespace OpenSim.Services.GridService
266 regInfo.ScopeID = scopeID; 269 regInfo.ScopeID = scopeID;
267 regInfo.EstateOwner = ownerID; 270 regInfo.EstateOwner = ownerID;
268 271
272 // Make sure we're not hyperlinking to regions on this grid!
273 if (regInfo.ServerURI.Trim(new char[]{'/', ' '}) == m_ThisGatekeeper.Trim(new char[]{'/', ' '}))
274 {
275 reason = "Cannot hyperlink to regions on the same grid";
276 return false;
277 }
278
269 // Check for free coordinates 279 // Check for free coordinates
270 GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY); 280 GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY);
271 if (region != null) 281 if (region != null)