diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid')
4 files changed, 52 insertions, 52 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 70733fc..d220568 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | |||
@@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
64 | public LocalGridServicesConnector(IConfigSource source) | 64 | public LocalGridServicesConnector(IConfigSource source) |
65 | { | 65 | { |
66 | m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader); | 66 | m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader); |
67 | InitialiseService(source, null); | 67 | InitialiseService(source, null); |
68 | } | 68 | } |
69 | 69 | ||
70 | public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache) | 70 | public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache) |
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
75 | 75 | ||
76 | #region ISharedRegionModule | 76 | #region ISharedRegionModule |
77 | 77 | ||
78 | public Type ReplaceableInterface | 78 | public Type ReplaceableInterface |
79 | { | 79 | { |
80 | get { return null; } | 80 | get { return null; } |
81 | } | 81 | } |
@@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
92 | { | 92 | { |
93 | string name = moduleConfig.GetString("GridServices", ""); | 93 | string name = moduleConfig.GetString("GridServices", ""); |
94 | if (name == Name) | 94 | if (name == Name) |
95 | { | 95 | { |
96 | if(InitialiseService(source, null)) | 96 | if(InitialiseService(source, null)) |
97 | m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled"); | 97 | m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled"); |
98 | } | 98 | } |
@@ -190,8 +190,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
190 | // This shouldn't happen | 190 | // This shouldn't happen |
191 | if (region == null) | 191 | if (region == null) |
192 | return; | 192 | return; |
193 | 193 | ||
194 | m_RegionInfoCache.CacheNearNeighbour(region.ScopeID, region); | 194 | m_RegionInfoCache.CacheNearNeighbour(region.ScopeID, region); |
195 | } | 195 | } |
196 | 196 | ||
197 | public string RegisterRegion(UUID scopeID, GridRegion regionInfo) | 197 | public string RegisterRegion(UUID scopeID, GridRegion regionInfo) |
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
206 | 206 | ||
207 | public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID) | 207 | public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID) |
208 | { | 208 | { |
209 | return m_GridService.GetNeighbours(scopeID, regionID); | 209 | return m_GridService.GetNeighbours(scopeID, regionID); |
210 | } | 210 | } |
211 | 211 | ||
212 | public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) | 212 | public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) |
@@ -282,7 +282,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
282 | { | 282 | { |
283 | return m_GridService.GetHyperlinks(scopeID); | 283 | return m_GridService.GetHyperlinks(scopeID); |
284 | } | 284 | } |
285 | 285 | ||
286 | public int GetRegionFlags(UUID scopeID, UUID regionID) | 286 | public int GetRegionFlags(UUID scopeID, UUID regionID) |
287 | { | 287 | { |
288 | return m_GridService.GetRegionFlags(scopeID, regionID); | 288 | return m_GridService.GetRegionFlags(scopeID, regionID); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs index 5eb525b..84e52f7 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
44 | // private static readonly ILog m_log = | 44 | // private static readonly ILog m_log = |
45 | // LogManager.GetLogger( | 45 | // LogManager.GetLogger( |
46 | // MethodBase.GetCurrentMethod().DeclaringType); | 46 | // MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | private static RegionsExpiringCache m_Cache; | 48 | private static RegionsExpiringCache m_Cache; |
49 | private int numberInstances; | 49 | private int numberInstances; |
50 | 50 | ||
@@ -60,12 +60,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
60 | if (rinfo != null) | 60 | if (rinfo != null) |
61 | this.Cache(rinfo.ScopeID, rinfo); | 61 | this.Cache(rinfo.ScopeID, rinfo); |
62 | } | 62 | } |
63 | 63 | ||
64 | public void Cache(UUID scopeID, GridRegion rinfo) | 64 | public void Cache(UUID scopeID, GridRegion rinfo) |
65 | { | 65 | { |
66 | if (rinfo == null) | 66 | if (rinfo == null) |
67 | return; | 67 | return; |
68 | 68 | ||
69 | m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS); | 69 | m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS); |
70 | } | 70 | } |
71 | 71 | ||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
73 | { | 73 | { |
74 | if (rinfo == null) | 74 | if (rinfo == null) |
75 | return; | 75 | return; |
76 | 76 | ||
77 | m_Cache.AddOrUpdate(rinfo.ScopeID, rinfo, 1e7f); | 77 | m_Cache.AddOrUpdate(rinfo.ScopeID, rinfo, 1e7f); |
78 | } | 78 | } |
79 | 79 | ||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
81 | { | 81 | { |
82 | if (rinfo == null) | 82 | if (rinfo == null) |
83 | return; | 83 | return; |
84 | 84 | ||
85 | m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS); | 85 | m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS); |
86 | } | 86 | } |
87 | 87 | ||
@@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
89 | { | 89 | { |
90 | if (rinfo == null) | 90 | if (rinfo == null) |
91 | return; | 91 | return; |
92 | 92 | ||
93 | m_Cache.AddOrUpdate(scopeID, rinfo, expireSeconds); | 93 | m_Cache.AddOrUpdate(scopeID, rinfo, expireSeconds); |
94 | } | 94 | } |
95 | 95 | ||
@@ -141,7 +141,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
141 | inCache = true; | 141 | inCache = true; |
142 | return rinfo; | 142 | return rinfo; |
143 | } | 143 | } |
144 | 144 | ||
145 | return null; | 145 | return null; |
146 | } | 146 | } |
147 | 147 | ||
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
155 | inCache = true; | 155 | inCache = true; |
156 | return rinfo; | 156 | return rinfo; |
157 | } | 157 | } |
158 | 158 | ||
159 | return null; | 159 | return null; |
160 | } | 160 | } |
161 | } | 161 | } |
@@ -300,7 +300,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
300 | private Dictionary<string, ulong> byname; | 300 | private Dictionary<string, ulong> byname; |
301 | private Dictionary<UUID, ulong> byuuid; | 301 | private Dictionary<UUID, ulong> byuuid; |
302 | // includes handles to the inside of large regions | 302 | // includes handles to the inside of large regions |
303 | private Dictionary<ulong, ulong> innerHandles = new Dictionary<ulong, ulong>(); | 303 | private Dictionary<ulong, ulong> innerHandles = new Dictionary<ulong, ulong>(); |
304 | 304 | ||
305 | public RegionInfoForScope() | 305 | public RegionInfoForScope() |
306 | { | 306 | { |
@@ -342,7 +342,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
342 | byuuid = new Dictionary<UUID, ulong>(); | 342 | byuuid = new Dictionary<UUID, ulong>(); |
343 | 343 | ||
344 | storage[handle] = region; | 344 | storage[handle] = region; |
345 | expires[handle] = expire; | 345 | expires[handle] = expire; |
346 | byname[region.RegionName] = handle; | 346 | byname[region.RegionName] = handle; |
347 | byuuid[region.RegionID] = handle; | 347 | byuuid[region.RegionID] = handle; |
348 | 348 | ||
@@ -385,7 +385,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
385 | storage[handle] = region; | 385 | storage[handle] = region; |
386 | byname[region.RegionName] = handle; | 386 | byname[region.RegionName] = handle; |
387 | byuuid[region.RegionID] = handle; | 387 | byuuid[region.RegionID] = handle; |
388 | 388 | ||
389 | } | 389 | } |
390 | 390 | ||
391 | public void Remove(GridRegion region) | 391 | public void Remove(GridRegion region) |
@@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
483 | 483 | ||
484 | if(!innerHandles.ContainsKey(handle)) | 484 | if(!innerHandles.ContainsKey(handle)) |
485 | return null; | 485 | return null; |
486 | 486 | ||
487 | ulong rhandle = innerHandles[handle]; | 487 | ulong rhandle = innerHandles[handle]; |
488 | if(storage.ContainsKey(rhandle)) | 488 | if(storage.ContainsKey(rhandle)) |
489 | return storage[rhandle]; | 489 | return storage[rhandle]; |
@@ -495,7 +495,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
495 | { | 495 | { |
496 | if(byname == null || !byname.ContainsKey(name)) | 496 | if(byname == null || !byname.ContainsKey(name)) |
497 | return null; | 497 | return null; |
498 | 498 | ||
499 | ulong handle = byname[name]; | 499 | ulong handle = byname[name]; |
500 | if(storage.ContainsKey(handle)) | 500 | if(storage.ContainsKey(handle)) |
501 | return storage[handle]; | 501 | return storage[handle]; |
@@ -528,7 +528,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
528 | 528 | ||
529 | if(!innerHandles.ContainsKey(handle)) | 529 | if(!innerHandles.ContainsKey(handle)) |
530 | return null; | 530 | return null; |
531 | 531 | ||
532 | ulong rhandle = innerHandles[handle]; | 532 | ulong rhandle = innerHandles[handle]; |
533 | if(!storage.ContainsKey(rhandle)) | 533 | if(!storage.ContainsKey(rhandle)) |
534 | return null; | 534 | return null; |
@@ -536,7 +536,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
536 | GridRegion r = storage[rhandle]; | 536 | GridRegion r = storage[rhandle]; |
537 | if(r == null) | 537 | if(r == null) |
538 | return null; | 538 | return null; |
539 | 539 | ||
540 | // extra check, possible redundant | 540 | // extra check, possible redundant |
541 | 541 | ||
542 | int test = r.RegionLocX; | 542 | int test = r.RegionLocX; |
@@ -552,7 +552,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
552 | if (y < test) | 552 | if (y < test) |
553 | return r; | 553 | return r; |
554 | 554 | ||
555 | /* | 555 | /* |
556 | // next do the harder work | 556 | // next do the harder work |
557 | foreach(KeyValuePair<ulong, GridRegion> kvp in storage) | 557 | foreach(KeyValuePair<ulong, GridRegion> kvp in storage) |
558 | { | 558 | { |
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
588 | if(kvp.Value < now) | 588 | if(kvp.Value < now) |
589 | toexpire.Add(kvp.Key); | 589 | toexpire.Add(kvp.Key); |
590 | } | 590 | } |
591 | 591 | ||
592 | if(toexpire.Count == 0) | 592 | if(toexpire.Count == 0) |
593 | return expires.Count; | 593 | return expires.Count; |
594 | 594 | ||
@@ -597,7 +597,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
597 | Clear(); | 597 | Clear(); |
598 | return 0; | 598 | return 0; |
599 | } | 599 | } |
600 | 600 | ||
601 | foreach(ulong h in toexpire) | 601 | foreach(ulong h in toexpire) |
602 | { | 602 | { |
603 | if(storage != null) | 603 | if(storage != null) |
@@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
658 | innerHandles[fh.toHandle()] = handle; | 658 | innerHandles[fh.toHandle()] = handle; |
659 | fh.y += 256; | 659 | fh.y += 256; |
660 | } | 660 | } |
661 | 661 | ||
662 | fh.y = startY; | 662 | fh.y = startY; |
663 | fh.x += 256; | 663 | fh.x += 256; |
664 | } | 664 | } |
@@ -684,18 +684,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
684 | innerHandles.Remove(fh.toHandle()); | 684 | innerHandles.Remove(fh.toHandle()); |
685 | fh.y += 256; | 685 | fh.y += 256; |
686 | } | 686 | } |
687 | 687 | ||
688 | fh.y = startY; | 688 | fh.y = startY; |
689 | fh.x += 256; | 689 | fh.x += 256; |
690 | } | 690 | } |
691 | } | 691 | } |
692 | } | 692 | } |
693 | 693 | ||
694 | public class RegionsExpiringCache | 694 | public class RegionsExpiringCache |
695 | { | 695 | { |
696 | const double CACHE_PURGE_HZ = 60; // seconds | 696 | const double CACHE_PURGE_HZ = 60; // seconds |
697 | const int MAX_LOCK_WAIT = 10000; // milliseconds | 697 | const int MAX_LOCK_WAIT = 10000; // milliseconds |
698 | 698 | ||
699 | /// <summary>For thread safety</summary> | 699 | /// <summary>For thread safety</summary> |
700 | object syncRoot = new object(); | 700 | object syncRoot = new object(); |
701 | /// <summary>For thread safety</summary> | 701 | /// <summary>For thread safety</summary> |
@@ -728,7 +728,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
728 | ris = new RegionInfoForScope(region, expire); | 728 | ris = new RegionInfoForScope(region, expire); |
729 | InfobyScope[scope] = ris; | 729 | InfobyScope[scope] = ris; |
730 | } | 730 | } |
731 | else | 731 | else |
732 | ris.AddUpdate(region, expire); | 732 | ris.AddUpdate(region, expire); |
733 | 733 | ||
734 | return true; | 734 | return true; |
@@ -748,7 +748,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
748 | } | 748 | } |
749 | finally { Monitor.Exit(syncRoot); } | 749 | finally { Monitor.Exit(syncRoot); } |
750 | } | 750 | } |
751 | 751 | ||
752 | public bool Contains(UUID scope, GridRegion region) | 752 | public bool Contains(UUID scope, GridRegion region) |
753 | { | 753 | { |
754 | if(region == null) | 754 | if(region == null) |
@@ -758,11 +758,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
758 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); | 758 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); |
759 | 759 | ||
760 | try | 760 | try |
761 | { | 761 | { |
762 | RegionInfoForScope ris = null; | 762 | RegionInfoForScope ris = null; |
763 | if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) | 763 | if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) |
764 | return false; | 764 | return false; |
765 | 765 | ||
766 | return ris.Contains(region); | 766 | return ris.Contains(region); |
767 | } | 767 | } |
768 | finally { Monitor.Exit(syncRoot); } | 768 | finally { Monitor.Exit(syncRoot); } |
@@ -774,11 +774,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
774 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); | 774 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); |
775 | 775 | ||
776 | try | 776 | try |
777 | { | 777 | { |
778 | RegionInfoForScope ris = null; | 778 | RegionInfoForScope ris = null; |
779 | if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) | 779 | if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) |
780 | return false; | 780 | return false; |
781 | 781 | ||
782 | return ris.Contains(handle); | 782 | return ris.Contains(handle); |
783 | } | 783 | } |
784 | finally { Monitor.Exit(syncRoot); } | 784 | finally { Monitor.Exit(syncRoot); } |
@@ -790,7 +790,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
790 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); | 790 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); |
791 | 791 | ||
792 | try | 792 | try |
793 | { | 793 | { |
794 | int count = 0; | 794 | int count = 0; |
795 | foreach(RegionInfoForScope ris in InfobyScope.Values) | 795 | foreach(RegionInfoForScope ris in InfobyScope.Values) |
796 | count += ris.Count(); | 796 | count += ris.Count(); |
@@ -804,7 +804,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
804 | if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT)) | 804 | if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT)) |
805 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); | 805 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); |
806 | try | 806 | try |
807 | { | 807 | { |
808 | RegionInfoForScope ris = null; | 808 | RegionInfoForScope ris = null; |
809 | if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) | 809 | if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) |
810 | return false; | 810 | return false; |
@@ -825,7 +825,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
825 | if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT)) | 825 | if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT)) |
826 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); | 826 | throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); |
827 | try | 827 | try |
828 | { | 828 | { |
829 | RegionInfoForScope ris = null; | 829 | RegionInfoForScope ris = null; |
830 | if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) | 830 | if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) |
831 | return false; | 831 | return false; |
@@ -940,7 +940,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
940 | private void PurgeCache(object sender, System.Timers.ElapsedEventArgs e) | 940 | private void PurgeCache(object sender, System.Timers.ElapsedEventArgs e) |
941 | { | 941 | { |
942 | // Only let one thread purge at once - a buildup could cause a crash | 942 | // Only let one thread purge at once - a buildup could cause a crash |
943 | // This could cause the purge to be delayed while there are lots of read/write ops | 943 | // This could cause the purge to be delayed while there are lots of read/write ops |
944 | // happening on the cache | 944 | // happening on the cache |
945 | if (!Monitor.TryEnter(isPurging)) | 945 | if (!Monitor.TryEnter(isPurging)) |
946 | return; | 946 | return; |
@@ -961,7 +961,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
961 | if (kvp.Value.expire(now) == 0) | 961 | if (kvp.Value.expire(now) == 0) |
962 | expiredscopes.Add(kvp.Key); | 962 | expiredscopes.Add(kvp.Key); |
963 | } | 963 | } |
964 | 964 | ||
965 | if (expiredscopes.Count > 0) | 965 | if (expiredscopes.Count > 0) |
966 | { | 966 | { |
967 | foreach (UUID sid in expiredscopes) | 967 | foreach (UUID sid in expiredscopes) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index 50e4c8a..ee17093 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
58 | private IGridService m_RemoteGridService; | 58 | private IGridService m_RemoteGridService; |
59 | 59 | ||
60 | private RegionInfoCache m_RegionInfoCache; | 60 | private RegionInfoCache m_RegionInfoCache; |
61 | 61 | ||
62 | public RemoteGridServicesConnector() | 62 | public RemoteGridServicesConnector() |
63 | { | 63 | { |
64 | } | 64 | } |
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
70 | 70 | ||
71 | #region ISharedRegionmodule | 71 | #region ISharedRegionmodule |
72 | 72 | ||
73 | public Type ReplaceableInterface | 73 | public Type ReplaceableInterface |
74 | { | 74 | { |
75 | get { return null; } | 75 | get { return null; } |
76 | } | 76 | } |
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
113 | return false; | 113 | return false; |
114 | } | 114 | } |
115 | 115 | ||
116 | Object[] args = new Object[] { source }; | 116 | Object[] args = new Object[] { source }; |
117 | m_RemoteGridService = ServerUtils.LoadPlugin<IGridService>(networkConnector, args); | 117 | m_RemoteGridService = ServerUtils.LoadPlugin<IGridService>(networkConnector, args); |
118 | 118 | ||
119 | m_LocalGridService = new LocalGridServicesConnector(source, m_RegionInfoCache); | 119 | m_LocalGridService = new LocalGridServicesConnector(source, m_RegionInfoCache); |
@@ -130,11 +130,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
130 | new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty); | 130 | new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty); |
131 | // Legacy. Remove soon! | 131 | // Legacy. Remove soon! |
132 | m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper); | 132 | m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper); |
133 | 133 | ||
134 | Util.checkServiceURI(m_ThisGatekeeper, out m_ThisGatekeeper); | 134 | Util.checkServiceURI(m_ThisGatekeeper, out m_ThisGatekeeper); |
135 | 135 | ||
136 | return true; | 136 | return true; |
137 | } | 137 | } |
138 | 138 | ||
139 | public void PostInitialise() | 139 | public void PostInitialise() |
140 | { | 140 | { |
@@ -249,14 +249,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
249 | { | 249 | { |
250 | if(string.IsNullOrWhiteSpace(m_ThisGatekeeper)) | 250 | if(string.IsNullOrWhiteSpace(m_ThisGatekeeper)) |
251 | return rinfo; // no HG | 251 | return rinfo; // no HG |
252 | 252 | ||
253 | string regionURI = ""; | 253 | string regionURI = ""; |
254 | if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName)) | 254 | if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName)) |
255 | return rinfo; // invalid | 255 | return rinfo; // invalid |
256 | if(m_ThisGatekeeper != regionURI) | 256 | if(m_ThisGatekeeper != regionURI) |
257 | return rinfo; // not local grid | 257 | return rinfo; // not local grid |
258 | } | 258 | } |
259 | 259 | ||
260 | rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); | 260 | rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); |
261 | m_RegionInfoCache.Cache(scopeID, rinfo); | 261 | m_RegionInfoCache.Cache(scopeID, rinfo); |
262 | return rinfo; | 262 | return rinfo; |
@@ -275,10 +275,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
275 | { | 275 | { |
276 | if(string.IsNullOrWhiteSpace(m_ThisGatekeeper)) | 276 | if(string.IsNullOrWhiteSpace(m_ThisGatekeeper)) |
277 | return rinfo; // no HG | 277 | return rinfo; // no HG |
278 | 278 | ||
279 | string regionURI = ""; | 279 | string regionURI = ""; |
280 | if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName)) | 280 | if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName)) |
281 | return rinfo; // invalid | 281 | return rinfo; // invalid |
282 | if(m_ThisGatekeeper != regionURI) | 282 | if(m_ThisGatekeeper != regionURI) |
283 | return rinfo; // not local grid | 283 | return rinfo; // not local grid |
284 | } | 284 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index 044e0e5..1378368 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs | |||
@@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
88 | Scene s = new Scene(new RegionInfo()); | 88 | Scene s = new Scene(new RegionInfo()); |
89 | s.RegionInfo.RegionID = r1.RegionID; | 89 | s.RegionInfo.RegionID = r1.RegionID; |
90 | m_LocalConnector.AddRegion(s); | 90 | m_LocalConnector.AddRegion(s); |
91 | 91 | ||
92 | GridRegion r2 = new GridRegion(); | 92 | GridRegion r2 = new GridRegion(); |
93 | r2.RegionName = "Test Region 2"; | 93 | r2.RegionName = "Test Region 2"; |
94 | r2.RegionID = new UUID(2); | 94 | r2.RegionID = new UUID(2); |