diff options
Diffstat (limited to 'OpenSim/Services/GridService')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 14 | ||||
-rw-r--r-- | OpenSim/Services/GridService/HypergridLinker.cs | 7 | ||||
-rw-r--r-- | OpenSim/Services/GridService/Properties/AssemblyInfo.cs | 4 |
3 files changed, 14 insertions, 11 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index ee3b858..daebf8b 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -185,15 +185,15 @@ namespace OpenSim.Services.GridService | |||
185 | 185 | ||
186 | if (!m_AllowDuplicateNames) | 186 | if (!m_AllowDuplicateNames) |
187 | { | 187 | { |
188 | List<RegionData> dupe = m_Database.Get(regionInfos.RegionName, scopeID); | 188 | List<RegionData> dupe = m_Database.Get(Util.EscapeForLike(regionInfos.RegionName), scopeID); |
189 | if (dupe != null && dupe.Count > 0) | 189 | if (dupe != null && dupe.Count > 0) |
190 | { | 190 | { |
191 | foreach (RegionData d in dupe) | 191 | foreach (RegionData d in dupe) |
192 | { | 192 | { |
193 | if (d.RegionID != regionInfos.RegionID) | 193 | if (d.RegionID != regionInfos.RegionID) |
194 | { | 194 | { |
195 | m_log.WarnFormat("[GRID SERVICE]: Region {0} tried to register duplicate name with ID {1}.", | 195 | m_log.WarnFormat("[GRID SERVICE]: Region tried to register using a duplicate name. New region: {0} ({1}), existing region: {2} ({3}).", |
196 | regionInfos.RegionName, regionInfos.RegionID); | 196 | regionInfos.RegionName, regionInfos.RegionID, d.RegionName, d.RegionID); |
197 | return "Duplicate region name"; | 197 | return "Duplicate region name"; |
198 | } | 198 | } |
199 | } | 199 | } |
@@ -359,7 +359,7 @@ namespace OpenSim.Services.GridService | |||
359 | 359 | ||
360 | public GridRegion GetRegionByName(UUID scopeID, string name) | 360 | public GridRegion GetRegionByName(UUID scopeID, string name) |
361 | { | 361 | { |
362 | List<RegionData> rdatas = m_Database.Get(name, scopeID); | 362 | List<RegionData> rdatas = m_Database.Get(Util.EscapeForLike(name), scopeID); |
363 | if ((rdatas != null) && (rdatas.Count > 0)) | 363 | if ((rdatas != null) && (rdatas.Count > 0)) |
364 | return RegionData2RegionInfo(rdatas[0]); // get the first | 364 | return RegionData2RegionInfo(rdatas[0]); // get the first |
365 | 365 | ||
@@ -377,7 +377,7 @@ namespace OpenSim.Services.GridService | |||
377 | { | 377 | { |
378 | // m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); | 378 | // m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); |
379 | 379 | ||
380 | List<RegionData> rdatas = m_Database.Get(name + "%", scopeID); | 380 | List<RegionData> rdatas = m_Database.Get(Util.EscapeForLike(name) + "%", scopeID); |
381 | 381 | ||
382 | int count = 0; | 382 | int count = 0; |
383 | List<GridRegion> rinfos = new List<GridRegion>(); | 383 | List<GridRegion> rinfos = new List<GridRegion>(); |
@@ -586,7 +586,7 @@ namespace OpenSim.Services.GridService | |||
586 | 586 | ||
587 | string regionName = cmd[3]; | 587 | string regionName = cmd[3]; |
588 | 588 | ||
589 | List<RegionData> regions = m_Database.Get(regionName, UUID.Zero); | 589 | List<RegionData> regions = m_Database.Get(Util.EscapeForLike(regionName), UUID.Zero); |
590 | if (regions == null || regions.Count < 1) | 590 | if (regions == null || regions.Count < 1) |
591 | { | 591 | { |
592 | MainConsole.Instance.Output("No region with name {0} found", regionName); | 592 | MainConsole.Instance.Output("No region with name {0} found", regionName); |
@@ -716,7 +716,7 @@ namespace OpenSim.Services.GridService | |||
716 | return; | 716 | return; |
717 | } | 717 | } |
718 | 718 | ||
719 | List<RegionData> regions = m_Database.Get(cmd[3], UUID.Zero); | 719 | List<RegionData> regions = m_Database.Get(Util.EscapeForLike(cmd[3]), UUID.Zero); |
720 | if (regions == null || regions.Count < 1) | 720 | if (regions == null || regions.Count < 1) |
721 | { | 721 | { |
722 | MainConsole.Instance.Output("Region not found"); | 722 | MainConsole.Instance.Output("Region not found"); |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 743d089..8335724 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -128,7 +128,10 @@ namespace OpenSim.Services.GridService | |||
128 | 128 | ||
129 | m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); | 129 | m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); |
130 | 130 | ||
131 | m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty); | 131 | m_ThisGatekeeper = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
132 | new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty); | ||
133 | // Legacy. Remove soon! | ||
134 | m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper); | ||
132 | try | 135 | try |
133 | { | 136 | { |
134 | m_ThisGatekeeperURI = new Uri(m_ThisGatekeeper); | 137 | m_ThisGatekeeperURI = new Uri(m_ThisGatekeeper); |
@@ -387,7 +390,7 @@ namespace OpenSim.Services.GridService | |||
387 | m_log.DebugFormat("[HYPERGRID LINKER]: Request to unlink {0}", mapName); | 390 | m_log.DebugFormat("[HYPERGRID LINKER]: Request to unlink {0}", mapName); |
388 | GridRegion regInfo = null; | 391 | GridRegion regInfo = null; |
389 | 392 | ||
390 | List<RegionData> regions = m_Database.Get(mapName, m_ScopeID); | 393 | List<RegionData> regions = m_Database.Get(Util.EscapeForLike(mapName), m_ScopeID); |
391 | if (regions != null && regions.Count > 0) | 394 | if (regions != null && regions.Count > 0) |
392 | { | 395 | { |
393 | OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]); | 396 | OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]); |
diff --git a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs index 5c0c8f4..b1e5e12 100644 --- a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |