aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Neighbour
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Neighbour')
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
index 7fff537..1b595e7 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
@@ -41,6 +41,8 @@ using OpenSim.Services.Interfaces;
41using OpenMetaverse; 41using OpenMetaverse;
42using OpenMetaverse.StructuredData; 42using OpenMetaverse.StructuredData;
43 43
44using GridRegion = OpenSim.Services.Interfaces.GridRegion;
45
44namespace OpenSim.Services.Connectors 46namespace OpenSim.Services.Connectors
45{ 47{
46 public class NeighbourServicesConnector : INeighbourService 48 public class NeighbourServicesConnector : INeighbourService
@@ -49,25 +51,27 @@ namespace OpenSim.Services.Connectors
49 LogManager.GetLogger( 51 LogManager.GetLogger(
50 MethodBase.GetCurrentMethod().DeclaringType); 52 MethodBase.GetCurrentMethod().DeclaringType);
51 53
52 protected IGridServices m_MapService = null; 54 protected IGridService m_GridService = null;
53 55
54 public NeighbourServicesConnector() 56 public NeighbourServicesConnector()
55 { 57 {
56 } 58 }
57 59
58 public NeighbourServicesConnector(IGridServices gridServices) 60 public NeighbourServicesConnector(IGridService gridServices)
59 { 61 {
60 Initialise(gridServices); 62 Initialise(gridServices);
61 } 63 }
62 64
63 public virtual void Initialise(IGridServices gridServices) 65 public virtual void Initialise(IGridService gridServices)
64 { 66 {
65 m_MapService = gridServices; 67 m_GridService = gridServices;
66 } 68 }
67 69
68 public virtual bool HelloNeighbour(ulong regionHandle, RegionInfo thisRegion) 70 public virtual bool HelloNeighbour(ulong regionHandle, RegionInfo thisRegion)
69 { 71 {
70 RegionInfo regInfo = m_MapService.RequestNeighbourInfo(regionHandle); 72 uint x = 0, y = 0;
73 Utils.LongToUInts(regionHandle, out x, out y);
74 GridRegion regInfo = m_GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
71 if ((regInfo != null) && 75 if ((regInfo != null) &&
72 // Don't remote-call this instance; that's a startup hickup 76 // Don't remote-call this instance; that's a startup hickup
73 !((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort))) 77 !((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort)))
@@ -79,7 +83,7 @@ namespace OpenSim.Services.Connectors
79 return false; 83 return false;
80 } 84 }
81 85
82 public bool DoHelloNeighbourCall(RegionInfo region, RegionInfo thisRegion) 86 public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion)
83 { 87 {
84 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/"; 88 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/";
85 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri); 89 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);