aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Land/LandServiceConnector.cs13
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs16
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs27
3 files changed, 39 insertions, 17 deletions
diff --git a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
index 0243f1f..06bc11c 100644
--- a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
@@ -38,6 +38,7 @@ using OpenSim.Framework.Servers.HttpServer;
38using OpenSim.Services.Interfaces; 38using OpenSim.Services.Interfaces;
39using OpenMetaverse; 39using OpenMetaverse;
40using Nwc.XmlRpc; 40using Nwc.XmlRpc;
41using GridRegion = OpenSim.Services.Interfaces.GridRegion;
41 42
42namespace OpenSim.Services.Connectors 43namespace OpenSim.Services.Connectors
43{ 44{
@@ -47,20 +48,20 @@ namespace OpenSim.Services.Connectors
47 LogManager.GetLogger( 48 LogManager.GetLogger(
48 MethodBase.GetCurrentMethod().DeclaringType); 49 MethodBase.GetCurrentMethod().DeclaringType);
49 50
50 protected IGridServices m_MapService = null; 51 protected IGridService m_GridService = null;
51 52
52 public LandServicesConnector() 53 public LandServicesConnector()
53 { 54 {
54 } 55 }
55 56
56 public LandServicesConnector(IGridServices gridServices) 57 public LandServicesConnector(IGridService gridServices)
57 { 58 {
58 Initialise(gridServices); 59 Initialise(gridServices);
59 } 60 }
60 61
61 public virtual void Initialise(IGridServices gridServices) 62 public virtual void Initialise(IGridService gridServices)
62 { 63 {
63 m_MapService = gridServices; 64 m_GridService = gridServices;
64 } 65 }
65 66
66 public virtual LandData GetLandData(ulong regionHandle, uint x, uint y) 67 public virtual LandData GetLandData(ulong regionHandle, uint x, uint y)
@@ -76,7 +77,9 @@ namespace OpenSim.Services.Connectors
76 77
77 try 78 try
78 { 79 {
79 RegionInfo info = m_MapService.RequestNeighbourInfo(regionHandle); 80 uint xpos = 0, ypos = 0;
81 Utils.LongToUInts(regionHandle, out xpos, out ypos);
82 GridRegion info = m_GridService.GetRegionByPosition(UUID.Zero, (int)xpos, (int)ypos);
80 if (info != null) // just to be sure 83 if (info != null) // just to be sure
81 { 84 {
82 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList); 85 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);
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);
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index ce432ab..96dc82b9 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -122,9 +122,6 @@ namespace OpenSim.Services.Interfaces
122 } 122 }
123 protected string m_regionName = String.Empty; 123 protected string m_regionName = String.Empty;
124 124
125 protected bool Allow_Alternate_Ports;
126 public bool m_allow_alternate_ports;
127
128 protected string m_externalHostName; 125 protected string m_externalHostName;
129 126
130 protected IPEndPoint m_internalEndPoint; 127 protected IPEndPoint m_internalEndPoint;
@@ -146,6 +143,10 @@ namespace OpenSim.Services.Interfaces
146 public UUID RegionID = UUID.Zero; 143 public UUID RegionID = UUID.Zero;
147 public UUID ScopeID = UUID.Zero; 144 public UUID ScopeID = UUID.Zero;
148 145
146 public UUID TerrainImage = UUID.Zero;
147 public byte Access;
148 public int Maturity;
149
149 public GridRegion() 150 public GridRegion()
150 { 151 {
151 } 152 }
@@ -183,9 +184,11 @@ namespace OpenSim.Services.Interfaces
183 m_internalEndPoint = ConvertFrom.InternalEndPoint; 184 m_internalEndPoint = ConvertFrom.InternalEndPoint;
184 m_externalHostName = ConvertFrom.ExternalHostName; 185 m_externalHostName = ConvertFrom.ExternalHostName;
185 m_httpPort = ConvertFrom.HttpPort; 186 m_httpPort = ConvertFrom.HttpPort;
186 m_allow_alternate_ports = ConvertFrom.m_allow_alternate_ports; 187 RegionID = ConvertFrom.RegionID;
187 RegionID = UUID.Zero;
188 ServerURI = ConvertFrom.ServerURI; 188 ServerURI = ConvertFrom.ServerURI;
189 TerrainImage = ConvertFrom.RegionSettings.TerrainImageID;
190 Access = ConvertFrom.AccessLevel;
191 Maturity = ConvertFrom.RegionSettings.Maturity;
189 } 192 }
190 193
191 194
@@ -268,7 +271,9 @@ namespace OpenSim.Services.Interfaces
268 kvp["serverHttpPort"] = HttpPort.ToString(); 271 kvp["serverHttpPort"] = HttpPort.ToString();
269 kvp["serverURI"] = ServerURI; 272 kvp["serverURI"] = ServerURI;
270 kvp["serverPort"] = InternalEndPoint.Port.ToString(); 273 kvp["serverPort"] = InternalEndPoint.Port.ToString();
271 274 kvp["regionMapTexture"] = TerrainImage.ToString();
275 kvp["access"] = Access.ToString();
276 // Maturity doesn't seem to exist in the DB
272 return kvp; 277 return kvp;
273 } 278 }
274 279
@@ -312,6 +317,16 @@ namespace OpenSim.Services.Interfaces
312 317
313 if (kvp.ContainsKey("serverURI")) 318 if (kvp.ContainsKey("serverURI"))
314 ServerURI = (string)kvp["serverURI"]; 319 ServerURI = (string)kvp["serverURI"];
320
321 if (kvp.ContainsKey("regionMapTexture"))
322 {
323 UUID.TryParse((string)kvp["regionMapTexture"], out TerrainImage);
324 }
325
326 if (kvp.ContainsKey("access"))
327 {
328 Access = Byte.Parse((string)kvp["access"]); ;
329 }
315 } 330 }
316 } 331 }
317 332