aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs28
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs36
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs3
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs3
4 files changed, 58 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs
index 0c2a835..b5bade6 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs
@@ -47,7 +47,7 @@ using Nini.Config;
47 47
48namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid 48namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
49{ 49{
50 public class HGGridConnector : ISharedRegionModule, IGridService 50 public class HGGridConnector : ISharedRegionModule, IGridService, IHyperlinkService
51 { 51 {
52 private static readonly ILog m_log = 52 private static readonly ILog m_log =
53 LogManager.GetLogger( 53 LogManager.GetLogger(
@@ -142,6 +142,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
142 return; 142 return;
143 143
144 scene.RegisterModuleInterface<IGridService>(this); 144 scene.RegisterModuleInterface<IGridService>(this);
145 scene.RegisterModuleInterface<IHyperlinkService>(this);
145 146
146 } 147 }
147 148
@@ -367,10 +368,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
367 } 368 }
368 #endregion 369 #endregion
369 370
370 #region Hyperlinks 371 #region IHyperlinkService
371 372
372 private static Random random = new Random(); 373 private static Random random = new Random();
373 374
375
374 public GridRegion TryLinkRegionToCoords(Scene m_scene, IClientAPI client, string mapName, int xloc, int yloc) 376 public GridRegion TryLinkRegionToCoords(Scene m_scene, IClientAPI client, string mapName, int xloc, int yloc)
375 { 377 {
376 string host = "127.0.0.1"; 378 string host = "127.0.0.1";
@@ -417,6 +419,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
417 return null; 419 return null;
418 } 420 }
419 421
422
420 // From the map search and secondlife://blah 423 // From the map search and secondlife://blah
421 public GridRegion TryLinkRegion(Scene m_scene, IClientAPI client, string mapName) 424 public GridRegion TryLinkRegion(Scene m_scene, IClientAPI client, string mapName)
422 { 425 {
@@ -554,6 +557,27 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
554 return true; 557 return true;
555 } 558 }
556 559
560 public GridRegion TryLinkRegion(IClientAPI client, string regionDescriptor)
561 {
562 return TryLinkRegion((Scene)client.Scene, client, regionDescriptor);
563 }
564
565 public GridRegion GetHyperlinkRegion(ulong handle)
566 {
567 foreach (GridRegion r in m_HyperlinkRegions.Values)
568 if (r.RegionHandle == handle)
569 return r;
570 return null;
571 }
572
573 public ulong FindRegionHandle(ulong handle)
574 {
575 foreach (GridRegion r in m_HyperlinkRegions.Values)
576 if ((r.RegionHandle == handle) && (m_HyperlinkHandles.ContainsKey(r.RegionID)))
577 return m_HyperlinkHandles[r.RegionID];
578 return 0;
579 }
580
557 #endregion 581 #endregion
558 582
559 } 583 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs
index 9519e23..f27b2f9 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;
42using OpenSim.Region.Framework.Scenes; 42using OpenSim.Region.Framework.Scenes;
43using OpenSim.Region.Framework.Scenes.Hypergrid; 43using OpenSim.Region.Framework.Scenes.Hypergrid;
44using OpenSim.Region.Framework.Scenes.Serialization; 44using OpenSim.Region.Framework.Scenes.Serialization;
45using GridRegion = OpenSim.Services.Interfaces.GridRegion;
45 46
46namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion 47namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
47{ 48{
@@ -161,7 +162,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
161 // else do the remote thing 162 // else do the remote thing
162 if (!m_localBackend.IsLocalRegion(regionHandle)) 163 if (!m_localBackend.IsLocalRegion(regionHandle))
163 { 164 {
164 RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); 165 uint x = 0, y = 0;
166 Utils.LongToUInts(regionHandle, out x, out y);
167 GridRegion regInfo = m_aScene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
165 if (regInfo != null) 168 if (regInfo != null)
166 { 169 {
167 m_regionClient.SendUserInformation(regInfo, aCircuit); 170 m_regionClient.SendUserInformation(regInfo, aCircuit);
@@ -183,7 +186,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
183 // else do the remote thing 186 // else do the remote thing
184 if (!m_localBackend.IsLocalRegion(regionHandle)) 187 if (!m_localBackend.IsLocalRegion(regionHandle))
185 { 188 {
186 RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); 189 uint x = 0, y = 0;
190 Utils.LongToUInts(regionHandle, out x, out y);
191 GridRegion regInfo = m_aScene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
187 if (regInfo != null) 192 if (regInfo != null)
188 { 193 {
189 return m_regionClient.DoChildAgentUpdateCall(regInfo, cAgentData); 194 return m_regionClient.DoChildAgentUpdateCall(regInfo, cAgentData);
@@ -204,7 +209,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
204 // else do the remote thing 209 // else do the remote thing
205 if (!m_localBackend.IsLocalRegion(regionHandle)) 210 if (!m_localBackend.IsLocalRegion(regionHandle))
206 { 211 {
207 RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); 212 uint x = 0, y = 0;
213 Utils.LongToUInts(regionHandle, out x, out y);
214 GridRegion regInfo = m_aScene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
208 if (regInfo != null) 215 if (regInfo != null)
209 { 216 {
210 return m_regionClient.DoChildAgentUpdateCall(regInfo, cAgentData); 217 return m_regionClient.DoChildAgentUpdateCall(regInfo, cAgentData);
@@ -225,7 +232,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
225 // else do the remote thing 232 // else do the remote thing
226 if (!m_localBackend.IsLocalRegion(regionHandle)) 233 if (!m_localBackend.IsLocalRegion(regionHandle))
227 { 234 {
228 RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); 235 uint x = 0, y = 0;
236 Utils.LongToUInts(regionHandle, out x, out y);
237 GridRegion regInfo = m_aScene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
229 if (regInfo != null) 238 if (regInfo != null)
230 { 239 {
231 return m_regionClient.DoRetrieveRootAgentCall(regInfo, id, out agent); 240 return m_regionClient.DoRetrieveRootAgentCall(regInfo, id, out agent);
@@ -257,7 +266,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
257 // else do the remote thing 266 // else do the remote thing
258 if (!m_localBackend.IsLocalRegion(regionHandle)) 267 if (!m_localBackend.IsLocalRegion(regionHandle))
259 { 268 {
260 RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); 269 uint x = 0, y = 0;
270 Utils.LongToUInts(regionHandle, out x, out y);
271 GridRegion regInfo = m_aScene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
261 if (regInfo != null) 272 if (regInfo != null)
262 { 273 {
263 return m_regionClient.DoCloseAgentCall(regInfo, id); 274 return m_regionClient.DoCloseAgentCall(regInfo, id);
@@ -284,7 +295,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
284 // else do the remote thing 295 // else do the remote thing
285 if (!m_localBackend.IsLocalRegion(regionHandle)) 296 if (!m_localBackend.IsLocalRegion(regionHandle))
286 { 297 {
287 RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); 298 uint x = 0, y = 0;
299 Utils.LongToUInts(regionHandle, out x, out y);
300 GridRegion regInfo = m_aScene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
288 if (regInfo != null) 301 if (regInfo != null)
289 { 302 {
290 return m_regionClient.DoCreateObjectCall( 303 return m_regionClient.DoCreateObjectCall(
@@ -798,13 +811,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
798 return false; 811 return false;
799 } 812 }
800 813
801 public override void SendUserInformation(RegionInfo regInfo, AgentCircuitData aCircuit) 814 public override void SendUserInformation(GridRegion regInfo, AgentCircuitData aCircuit)
802 { 815 {
803 try 816 try
804 { 817 {
805 if (m_aScene.SceneGridService is HGSceneCommunicationService) 818 if (m_aScene.SceneGridService is HGSceneCommunicationService)
806 { 819 {
807 ((HGSceneCommunicationService)(m_aScene.SceneGridService)).m_hg.SendUserInformation(regInfo, aCircuit); 820 // big hack for now
821 RegionInfo r = new RegionInfo();
822 r.ExternalHostName = regInfo.ExternalHostName;
823 r.HttpPort = regInfo.HttpPort;
824 r.RegionID = regInfo.RegionID;
825 r.RegionLocX = (uint)regInfo.RegionLocX;
826 r.RegionLocY = (uint)regInfo.RegionLocY;
827 ((HGSceneCommunicationService)(m_aScene.SceneGridService)).m_hg.SendUserInformation(r, aCircuit);
808 } 828 }
809 } 829 }
810 catch // Bad cast 830 catch // Bad cast
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs
index a52c70b..b0ace39 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs
@@ -37,6 +37,7 @@ using OpenSim.Region.Framework.Scenes;
37using OpenSim.Services.Interfaces; 37using OpenSim.Services.Interfaces;
38using OpenSim.Server.Base; 38using OpenSim.Server.Base;
39 39
40
40namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land 41namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
41{ 42{
42 public class RemoteLandServicesConnector : 43 public class RemoteLandServicesConnector :
@@ -89,7 +90,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
89 if (!m_Enabled) 90 if (!m_Enabled)
90 return; 91 return;
91 92
92 m_MapService = scene.CommsManager.GridService; 93 m_GridService = scene.GridService;
93 m_LocalService.AddRegion(scene); 94 m_LocalService.AddRegion(scene);
94 scene.RegisterModuleInterface<ILandService>(this); 95 scene.RegisterModuleInterface<ILandService>(this);
95 } 96 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs
index c5bc03b..912c393 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs
@@ -118,7 +118,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour
118 if (!m_Enabled) 118 if (!m_Enabled)
119 return; 119 return;
120 120
121 m_MapService = scene.CommsManager.GridService;
122 m_LocalService.AddRegion(scene); 121 m_LocalService.AddRegion(scene);
123 scene.RegisterModuleInterface<INeighbourService>(this); 122 scene.RegisterModuleInterface<INeighbourService>(this);
124 } 123 }
@@ -134,6 +133,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour
134 if (!m_Enabled) 133 if (!m_Enabled)
135 return; 134 return;
136 135
136 m_GridService = scene.GridService;
137
137 m_log.InfoFormat("[NEIGHBOUR CONNECTOR]: Enabled remote neighbours for region {0}", scene.RegionInfo.RegionName); 138 m_log.InfoFormat("[NEIGHBOUR CONNECTOR]: Enabled remote neighbours for region {0}", scene.RegionInfo.RegionName);
138 139
139 } 140 }