diff options
author | Diva Canto | 2009-09-26 08:06:14 -0700 |
---|---|---|
committer | Diva Canto | 2009-09-26 08:06:14 -0700 |
commit | d39e67d5b2ca974e7e2506bcb717ec25ae061e75 (patch) | |
tree | 7dc26b8c530fbd1446835c1334ad42569480645d /OpenSim | |
parent | Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-d39e67d5b2ca974e7e2506bcb717ec25ae061e75.zip opensim-SC_OLD-d39e67d5b2ca974e7e2506bcb717ec25ae061e75.tar.gz opensim-SC_OLD-d39e67d5b2ca974e7e2506bcb717ec25ae061e75.tar.bz2 opensim-SC_OLD-d39e67d5b2ca974e7e2506bcb717ec25ae061e75.tar.xz |
More redirects to HGGridConnector-as-HyperlinkService.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs | 21 |
2 files changed, 20 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs index b5bade6..66cde91 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs | |||
@@ -567,6 +567,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
567 | foreach (GridRegion r in m_HyperlinkRegions.Values) | 567 | foreach (GridRegion r in m_HyperlinkRegions.Values) |
568 | if (r.RegionHandle == handle) | 568 | if (r.RegionHandle == handle) |
569 | return r; | 569 | return r; |
570 | foreach (GridRegion r in m_knownRegions.Values) | ||
571 | if (r.RegionHandle == handle) | ||
572 | return r; | ||
570 | return null; | 573 | return null; |
571 | } | 574 | } |
572 | 575 | ||
@@ -575,7 +578,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
575 | foreach (GridRegion r in m_HyperlinkRegions.Values) | 578 | foreach (GridRegion r in m_HyperlinkRegions.Values) |
576 | if ((r.RegionHandle == handle) && (m_HyperlinkHandles.ContainsKey(r.RegionID))) | 579 | if ((r.RegionHandle == handle) && (m_HyperlinkHandles.ContainsKey(r.RegionID))) |
577 | return m_HyperlinkHandles[r.RegionID]; | 580 | return m_HyperlinkHandles[r.RegionID]; |
578 | return 0; | 581 | return handle; |
579 | } | 582 | } |
580 | 583 | ||
581 | #endregion | 584 | #endregion |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs index f27b2f9..adf747a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs | |||
@@ -42,6 +42,7 @@ using OpenSim.Region.Framework.Interfaces; | |||
42 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
43 | using OpenSim.Region.Framework.Scenes.Hypergrid; | 43 | using OpenSim.Region.Framework.Scenes.Hypergrid; |
44 | using OpenSim.Region.Framework.Scenes.Serialization; | 44 | using OpenSim.Region.Framework.Scenes.Serialization; |
45 | using OpenSim.Services.Interfaces; | ||
45 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 46 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
46 | 47 | ||
47 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | 48 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion |
@@ -60,6 +61,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
60 | 61 | ||
61 | protected RegionToRegionClient m_regionClient; | 62 | protected RegionToRegionClient m_regionClient; |
62 | 63 | ||
64 | protected IHyperlinkService m_hyperlinkService; | ||
65 | |||
63 | protected bool m_safemode; | 66 | protected bool m_safemode; |
64 | protected IPAddress m_thisIP; | 67 | protected IPAddress m_thisIP; |
65 | 68 | ||
@@ -135,7 +138,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
135 | m_localBackend = new LocalInterregionComms(); | 138 | m_localBackend = new LocalInterregionComms(); |
136 | m_commsManager = scene.CommsManager; | 139 | m_commsManager = scene.CommsManager; |
137 | m_aScene = scene; | 140 | m_aScene = scene; |
138 | m_regionClient = new RegionToRegionClient(m_aScene); | 141 | m_hyperlinkService = m_aScene.RequestModuleInterface<IHyperlinkService>(); |
142 | m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); | ||
139 | m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); | 143 | m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); |
140 | } | 144 | } |
141 | 145 | ||
@@ -789,16 +793,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
789 | protected class RegionToRegionClient : RegionClient | 793 | protected class RegionToRegionClient : RegionClient |
790 | { | 794 | { |
791 | Scene m_aScene = null; | 795 | Scene m_aScene = null; |
796 | IHyperlinkService m_hyperlinkService; | ||
792 | 797 | ||
793 | public RegionToRegionClient(Scene s) | 798 | public RegionToRegionClient(Scene s, IHyperlinkService hyperService) |
794 | { | 799 | { |
795 | m_aScene = s; | 800 | m_aScene = s; |
801 | m_hyperlinkService = hyperService; | ||
796 | } | 802 | } |
797 | 803 | ||
798 | public override ulong GetRegionHandle(ulong handle) | 804 | public override ulong GetRegionHandle(ulong handle) |
799 | { | 805 | { |
800 | if (m_aScene.SceneGridService is HGSceneCommunicationService) | 806 | if (m_aScene.SceneGridService is HGSceneCommunicationService) |
801 | return ((HGSceneCommunicationService)(m_aScene.SceneGridService)).m_hg.FindRegionHandle(handle); | 807 | { |
808 | if (m_hyperlinkService != null) | ||
809 | return m_hyperlinkService.FindRegionHandle(handle); | ||
810 | } | ||
802 | 811 | ||
803 | return handle; | 812 | return handle; |
804 | } | 813 | } |
@@ -806,8 +815,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
806 | public override bool IsHyperlink(ulong handle) | 815 | public override bool IsHyperlink(ulong handle) |
807 | { | 816 | { |
808 | if (m_aScene.SceneGridService is HGSceneCommunicationService) | 817 | if (m_aScene.SceneGridService is HGSceneCommunicationService) |
809 | return ((HGSceneCommunicationService)(m_aScene.SceneGridService)).m_hg.IsHyperlinkRegion(handle); | 818 | { |
810 | 819 | if ((m_hyperlinkService != null) && (m_hyperlinkService.GetHyperlinkRegion(handle) != null)) | |
820 | return true; | ||
821 | } | ||
811 | return false; | 822 | return false; |
812 | } | 823 | } |
813 | 824 | ||