From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- .../Asset/AssetServiceInConnectorModule.cs | 6 ++-- .../AuthenticationServiceInConnectorModule.cs | 4 +-- .../Grid/GridInfoServiceInConnectorModule.cs | 4 +-- .../Hypergrid/HypergridServiceInConnectorModule.cs | 6 ++-- .../Inventory/InventoryServiceInConnectorModule.cs | 4 +-- .../Land/LandServiceInConnectorModule.cs | 33 ++++++++++++++++---- .../Login/LLLoginServiceInConnectorModule.cs | 4 +-- .../MapImage/MapImageServiceInConnectorModule.cs | 4 +-- .../Neighbour/NeighbourServiceInConnectorModule.cs | 2 +- .../SimulationServiceInConnectorModule.cs | 2 +- .../LocalUserProfilesServiceConnector.cs | 36 +++++++++++----------- 11 files changed, 63 insertions(+), 42 deletions(-) (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsIn') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs index 7b4668a..2c882e6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs @@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static bool m_Enabled = false; - + private IConfigSource m_Config; bool m_Registered = false; @@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } @@ -95,7 +95,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset m_log.Info("[HGAssetService]: Starting..."); - + Object[] args = new Object[] { m_Config, MainServer.Instance, "HGAssetService" }; ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:AssetServiceConnector", args); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs index 2cdffe6..a8c4e3c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs @@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static bool m_Enabled = false; - + private IConfigSource m_Config; bool m_Registered = false; @@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs index 22857d0..834cbb7 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs @@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static bool m_Enabled = false; - + private IConfigSource m_Config; bool m_Registered = false; @@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs index f749295..4f87595 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs @@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static bool m_Enabled = false; - + private IConfigSource m_Config; private bool m_Registered = false; private string m_LocalServiceDll = String.Empty; @@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } @@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid m_HypergridHandler = new GatekeeperServiceInConnector(m_Config, MainServer.Instance, simService); m_UASHandler = new UserAgentServerConnector(m_Config, MainServer.Instance, friendsConn); - + new HeloServiceInConnector(m_Config, MainServer.Instance, "HeloService"); new HGFriendsServerConnector(m_Config, MainServer.Instance, "HGFriendsService", friendsConn); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs index 0a4e736..61e37a9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs @@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static bool m_Enabled = false; - + private IConfigSource m_Config; bool m_Registered = false; @@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs index 2fd21be..fb8c306 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs @@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } @@ -126,15 +126,36 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land public LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess) { - m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}", - regionHandle, m_Scenes.Count); +// m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}", +// regionHandle, m_Scenes.Count); + + uint rx = 0, ry = 0; + Util.RegionHandleToWorldLoc(regionHandle, out rx, out ry); + rx += x; + ry += y; foreach (Scene s in m_Scenes) { - if (s.RegionInfo.RegionHandle == regionHandle) + uint t = s.RegionInfo.WorldLocX; + if( rx < t) + continue; + t += s.RegionInfo.RegionSizeX; + if( rx >= t) + continue; + t = s.RegionInfo.WorldLocY; + if( ry < t) + continue; + t += s.RegionInfo.RegionSizeY; + if( ry < t) { - m_log.Debug("[LAND IN CONNECTOR]: Found region to GetLandData from"); +// m_log.Debug("[LAND IN CONNECTOR]: Found region to GetLandData from"); + x = rx - s.RegionInfo.WorldLocX; + y = ry - s.RegionInfo.WorldLocY; regionAccess = s.RegionInfo.AccessLevel; - return s.GetLandData(x, y); + LandData land = s.GetLandData(x, y); + IDwellModule dwellModule = s.RequestModuleInterface(); + if (dwellModule != null) + land.Dwell = dwellModule.GetDwell(land); + return land; } } m_log.DebugFormat("[LAND IN CONNECTOR]: region handle {0} not found", regionHandle); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs index 425febd..065dd94 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs @@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } @@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login { if (!m_Enabled) return; - + if (!m_Registered) { m_Registered = true; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs index c14bce7..a75a156 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs @@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.MapImage { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static bool m_Enabled = false; - + private IConfigSource m_Config; #region Region Module interface @@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.MapImage { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs index 6bf47cb..09c545c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs @@ -83,7 +83,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs index 57d1132..7ba39d4 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs @@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs index 4701ee6..2e6f472 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs @@ -77,65 +77,65 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile { get; private set; } - - public Type ReplaceableInterface + + public Type ReplaceableInterface { get { return null; } } public LocalUserProfilesServicesConnector() { - m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector no params"); + //m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector no params"); } - + public LocalUserProfilesServicesConnector(IConfigSource source) { - m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector instantiated directly."); + //m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector instantiated directly."); InitialiseService(source); } public void InitialiseService(IConfigSource source) { ConfigName = "UserProfilesService"; - + // Instantiate the request handler IHttpServer Server = MainServer.Instance; IConfig config = source.Configs[ConfigName]; if (config == null) { - m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: UserProfilesService missing from OpenSim.ini"); + //m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: UserProfilesService missing from OpenSim.ini"); return; } - + if(!config.GetBoolean("Enabled",false)) { Enabled = false; return; } - + Enabled = true; - + string serviceDll = config.GetString("LocalServiceModule", String.Empty); - + if (serviceDll == String.Empty) { m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: No LocalServiceModule named in section UserProfilesService"); return; } - + Object[] args = new Object[] { source, ConfigName }; ServiceModule = ServerUtils.LoadPlugin(serviceDll, args); - + if (ServiceModule == null) { m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: Can't load user profiles service"); return; } - + Enabled = true; JsonRpcProfileHandlers handler = new JsonRpcProfileHandlers(ServiceModule); @@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile { if (!Enabled) return; - + lock (regions) { if (regions.ContainsKey(scene.RegionInfo.RegionID)) @@ -209,7 +209,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile void IRegionModuleBase.RemoveRegion(Scene scene) { if (!Enabled) - return; + return; lock (regions) { @@ -221,8 +221,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile void IRegionModuleBase.RegionLoaded(Scene scene) { if (!Enabled) - return; + return; } #endregion } -} \ No newline at end of file +} -- cgit v1.1