diff options
author | UbitUmarov | 2016-12-16 03:38:20 +0000 |
---|---|---|
committer | UbitUmarov | 2016-12-16 03:38:20 +0000 |
commit | e2d46c060c4b9557cf596d6d828ddd296fa0af70 (patch) | |
tree | c2c44730340c9785b9b373c937a2a54b2e6ec34e /OpenSim/Services/GridService/GridService.cs | |
parent | reserve constant OBJECT_ATTACHED_SLOTS_AVAILABLE from mantis 8096. But do not... (diff) | |
download | opensim-SC_OLD-e2d46c060c4b9557cf596d6d828ddd296fa0af70.zip opensim-SC_OLD-e2d46c060c4b9557cf596d6d828ddd296fa0af70.tar.gz opensim-SC_OLD-e2d46c060c4b9557cf596d6d828ddd296fa0af70.tar.bz2 opensim-SC_OLD-e2d46c060c4b9557cf596d6d828ddd296fa0af70.tar.xz |
ok.. another try on the HG uri
Diffstat (limited to 'OpenSim/Services/GridService/GridService.cs')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 82b910a..c51bb8b 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -505,11 +505,16 @@ namespace OpenSim.Services.GridService | |||
505 | { | 505 | { |
506 | string regionURI = ""; | 506 | string regionURI = ""; |
507 | string regionName = ""; | 507 | string regionName = ""; |
508 | if(!m_HypergridLinker.buildHGRegionURI(name, out regionURI, out regionName)) | 508 | if(!Util.buildHGRegionURI(name, out regionURI, out regionName)) |
509 | return null; | 509 | return null; |
510 | 510 | ||
511 | bool localGrid = string.IsNullOrWhiteSpace(regionURI); | 511 | string mapname; |
512 | string mapname = regionURI + regionName; | 512 | bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI); |
513 | if(localGrid) | ||
514 | mapname = regionName; | ||
515 | else | ||
516 | mapname = regionURI + regionName; | ||
517 | |||
513 | bool haveMatch = false; | 518 | bool haveMatch = false; |
514 | 519 | ||
515 | if (rdatas != null && (rdatas.Count > 0)) | 520 | if (rdatas != null && (rdatas.Count > 0)) |
@@ -555,7 +560,7 @@ namespace OpenSim.Services.GridService | |||
555 | if(haveMatch) | 560 | if(haveMatch) |
556 | return rinfos; | 561 | return rinfos; |
557 | } | 562 | } |
558 | if(!localGrid) | 563 | if(!localGrid && !string.IsNullOrWhiteSpace(regionURI)) |
559 | { | 564 | { |
560 | string HGname = regionURI +" "+ regionName; // include space for compatibility | 565 | string HGname = regionURI +" "+ regionName; // include space for compatibility |
561 | GridRegion r = m_HypergridLinker.LinkRegion(scopeID, HGname); | 566 | GridRegion r = m_HypergridLinker.LinkRegion(scopeID, HGname); |
@@ -592,15 +597,21 @@ namespace OpenSim.Services.GridService | |||
592 | { | 597 | { |
593 | string regionURI = ""; | 598 | string regionURI = ""; |
594 | string regionName = ""; | 599 | string regionName = ""; |
595 | if(!m_HypergridLinker.buildHGRegionURI(name, out regionURI, out regionName)) | 600 | if(!Util.buildHGRegionURI(name, out regionURI, out regionName)) |
596 | return null; | 601 | return null; |
597 | 602 | ||
598 | string mapname = regionURI + regionName; | 603 | string mapname; |
604 | bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI); | ||
605 | if(localGrid) | ||
606 | mapname = regionName; | ||
607 | else | ||
608 | mapname = regionURI + regionName; | ||
609 | |||
599 | List<RegionData> rdatas = m_Database.Get(Util.EscapeForLike(mapname), scopeID); | 610 | List<RegionData> rdatas = m_Database.Get(Util.EscapeForLike(mapname), scopeID); |
600 | if ((rdatas != null) && (rdatas.Count > 0)) | 611 | if ((rdatas != null) && (rdatas.Count > 0)) |
601 | return RegionData2RegionInfo(rdatas[0]); // get the first | 612 | return RegionData2RegionInfo(rdatas[0]); // get the first |
602 | 613 | ||
603 | if(!string.IsNullOrWhiteSpace(regionURI)) | 614 | if(!localGrid && !string.IsNullOrWhiteSpace(regionURI)) |
604 | { | 615 | { |
605 | string HGname = regionURI +" "+ regionName; | 616 | string HGname = regionURI +" "+ regionName; |
606 | return m_HypergridLinker.LinkRegion(scopeID, HGname); | 617 | return m_HypergridLinker.LinkRegion(scopeID, HGname); |