aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs
diff options
context:
space:
mode:
authorDiva Canto2009-09-26 07:48:21 -0700
committerDiva Canto2009-09-26 07:48:21 -0700
commit5757afe7665543e8b3ed4a322a7d6e095dafcdb3 (patch)
treebed3c7ab11459e84baa5a0fbd98dde4a81fd5e16 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs
parentMore small changes to FlotsamAssetCache as per mcortez' request. (diff)
downloadopensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.zip
opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.tar.gz
opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.tar.bz2
opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.tar.xz
First pass at the heart surgery for grid services. Compiles and runs minimally. A few bugs to catch now.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs36
1 files changed, 28 insertions, 8 deletions
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