aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-02 00:40:23 +0100
committerJustin Clark-Casey (justincc)2011-08-02 00:40:23 +0100
commite6fb9d74ef10e381731b31367a96ad751484a867 (patch)
tree46e5d02205b63d16f29b3aaf6a3ad910192aaeb6
parentIn GridService, have GetRegionByName() call GetRegionsByName() with a max ret... (diff)
downloadopensim-SC-e6fb9d74ef10e381731b31367a96ad751484a867.zip
opensim-SC-e6fb9d74ef10e381731b31367a96ad751484a867.tar.gz
opensim-SC-e6fb9d74ef10e381731b31367a96ad751484a867.tar.bz2
opensim-SC-e6fb9d74ef10e381731b31367a96ad751484a867.tar.xz
Revert "In GridService, have GetRegionByName() call GetRegionsByName() with a max return of 1 instead of duplicating code."
This reverts commit 8d33a2eaa10ed75146f45cca4d6c19ac814d5fee. Better fix will be along in a minute
-rw-r--r--OpenSim/Services/GridService/GridService.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 1253b5a..985d77b 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -322,17 +322,16 @@ namespace OpenSim.Services.GridService
322 322
323 public GridRegion GetRegionByName(UUID scopeID, string regionName) 323 public GridRegion GetRegionByName(UUID scopeID, string regionName)
324 { 324 {
325 List<GridRegion> rinfos = GetRegionsByName(scopeID, regionName, 1); 325 List<RegionData> rdatas = m_Database.Get(regionName + "%", scopeID);
326 326 if ((rdatas != null) && (rdatas.Count > 0))
327 if (rinfos.Count > 0) 327 return RegionData2RegionInfo(rdatas[0]); // get the first
328 return rinfos[0];
329 328
330 return null; 329 return null;
331 } 330 }
332 331
333 public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber) 332 public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
334 { 333 {
335// m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); 334 m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name);
336 335
337 List<RegionData> rdatas = m_Database.Get(name + "%", scopeID); 336 List<RegionData> rdatas = m_Database.Get(name + "%", scopeID);
338 337