aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/GridService/GridService.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-12-15 23:48:25 +0000
committerUbitUmarov2016-12-15 23:48:25 +0000
commitc0a23d36dfa28a3204b31883e1e7bc76b249c8fb (patch)
tree092a5900e8135e97dbc37ef0cfd0aed0e70f01d6 /OpenSim/Services/GridService/GridService.cs
parentset pbs shape acording to mesh number of (material) faces (diff)
downloadopensim-SC-c0a23d36dfa28a3204b31883e1e7bc76b249c8fb.zip
opensim-SC-c0a23d36dfa28a3204b31883e1e7bc76b249c8fb.tar.gz
opensim-SC-c0a23d36dfa28a3204b31883e1e7bc76b249c8fb.tar.bz2
opensim-SC-c0a23d36dfa28a3204b31883e1e7bc76b249c8fb.tar.xz
GetRegionsByName and GetHypergridRegionByName: detect that provided url is for local grid, and make it a local by region name local search
Diffstat (limited to 'OpenSim/Services/GridService/GridService.cs')
-rw-r--r--OpenSim/Services/GridService/GridService.cs29
1 files changed, 17 insertions, 12 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 31a186a..82b910a 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -508,6 +508,7 @@ namespace OpenSim.Services.GridService
508 if(!m_HypergridLinker.buildHGRegionURI(name, out regionURI, out regionName)) 508 if(!m_HypergridLinker.buildHGRegionURI(name, out regionURI, out regionName))
509 return null; 509 return null;
510 510
511 bool localGrid = string.IsNullOrWhiteSpace(regionURI);
511 string mapname = regionURI + regionName; 512 string mapname = regionURI + regionName;
512 bool haveMatch = false; 513 bool haveMatch = false;
513 514
@@ -531,7 +532,7 @@ namespace OpenSim.Services.GridService
531 if(haveMatch) 532 if(haveMatch)
532 return rinfos; 533 return rinfos;
533 } 534 }
534 535
535 rdatas = m_Database.Get(Util.EscapeForLike(mapname)+ "%", scopeID); 536 rdatas = m_Database.Get(Util.EscapeForLike(mapname)+ "%", scopeID);
536 if (rdatas != null && (rdatas.Count > 0)) 537 if (rdatas != null && (rdatas.Count > 0))
537 { 538 {
@@ -554,14 +555,16 @@ namespace OpenSim.Services.GridService
554 if(haveMatch) 555 if(haveMatch)
555 return rinfos; 556 return rinfos;
556 } 557 }
557 558 if(!localGrid)
558 string HGname = regionURI +" "+ regionName;
559 GridRegion r = m_HypergridLinker.LinkRegion(scopeID, HGname);
560 if (r != null)
561 { 559 {
562 if( count == maxNumber) 560 string HGname = regionURI +" "+ regionName; // include space for compatibility
563 rinfos.RemoveAt(count - 1); 561 GridRegion r = m_HypergridLinker.LinkRegion(scopeID, HGname);
564 rinfos.Add(r); 562 if (r != null)
563 {
564 if( count == maxNumber)
565 rinfos.RemoveAt(count - 1);
566 rinfos.Add(r);
567 }
565 } 568 }
566 } 569 }
567 else if (rdatas != null && (rdatas.Count > 0)) 570 else if (rdatas != null && (rdatas.Count > 0))
@@ -597,11 +600,13 @@ namespace OpenSim.Services.GridService
597 if ((rdatas != null) && (rdatas.Count > 0)) 600 if ((rdatas != null) && (rdatas.Count > 0))
598 return RegionData2RegionInfo(rdatas[0]); // get the first 601 return RegionData2RegionInfo(rdatas[0]); // get the first
599 602
600 string HGname = regionURI +" "+ regionName; 603 if(!string.IsNullOrWhiteSpace(regionURI))
601 return m_HypergridLinker.LinkRegion(scopeID, HGname); 604 {
605 string HGname = regionURI +" "+ regionName;
606 return m_HypergridLinker.LinkRegion(scopeID, HGname);
607 }
602 } 608 }
603 else 609 return null;
604 return null;
605 } 610 }
606 611
607 public List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax) 612 public List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax)