From e6fb9d74ef10e381731b31367a96ad751484a867 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 2 Aug 2011 00:40:23 +0100 Subject: 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 --- OpenSim/Services/GridService/GridService.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'OpenSim/Services') 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 public GridRegion GetRegionByName(UUID scopeID, string regionName) { - List rinfos = GetRegionsByName(scopeID, regionName, 1); - - if (rinfos.Count > 0) - return rinfos[0]; + List rdatas = m_Database.Get(regionName + "%", scopeID); + if ((rdatas != null) && (rdatas.Count > 0)) + return RegionData2RegionInfo(rdatas[0]); // get the first return null; } public List GetRegionsByName(UUID scopeID, string name, int maxNumber) { -// m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); + m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); List rdatas = m_Database.Get(name + "%", scopeID); -- cgit v1.1