From 8e37e7eb07d55146f5c130dc3fd58c1b546e596b Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 2 Aug 2010 00:54:58 +0200 Subject: [PATCH 1/3] Remove the (wrong) implementation if llPointAt. It never worked on the LL grid and is officially deprecated. There is no way to rotate an avatar programmatically. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 525f0f0ea2..ed63aeee02 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3248,17 +3248,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPointAt(LSL_Vector pos) { m_host.AddScriptLPS(1); - ScenePresence Owner = World.GetScenePresence(m_host.UUID); - LSL_Rotation rot = llEuler2Rot(pos); - Owner.PreviousRotation = Owner.Rotation; - Owner.Rotation = (new Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s)); } public void llStopPointAt() { m_host.AddScriptLPS(1); - ScenePresence Owner = m_host.ParentGroup.Scene.GetScenePresence(m_host.OwnerID); - Owner.Rotation = Owner.PreviousRotation; } public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) From 239478f3a9b0f651b451282cd204269545b025d9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 3 Aug 2010 16:02:52 -0700 Subject: [PATCH 2/3] Bug fix (HG): mantis #4891. This doesn't actually fix the underlying bug, but it clears up the circular dependency issue between Gatekeeper and UserAgents that had made me resort to in-process remote calls, which, in turn, were hitting bugs down there somewhere in mono. NOTE: CONFIGURATION CHANGE IN ROBUST.HG.INI.EXAMPLE !!!###!!! --- .../HypergridService/GatekeeperService.cs | 87 ++++++++++--------- .../HypergridService/UserAgentService.cs | 16 ++-- bin/Robust.HG.ini.example | 1 + bin/config-include/StandaloneHypergrid.ini | 2 + 4 files changed, 58 insertions(+), 48 deletions(-) diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index c5cfe75fdf..3fc932758b 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -49,61 +49,64 @@ namespace OpenSim.Services.HypergridService LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); - IGridService m_GridService; - IPresenceService m_PresenceService; - IUserAccountService m_UserAccountService; - IUserAgentService m_UserAgentService; - ISimulationService m_SimulationService; + private static bool m_Initialized = false; - string m_AuthDll; + private static IGridService m_GridService; + private static IPresenceService m_PresenceService; + private static IUserAccountService m_UserAccountService; + private static IUserAgentService m_UserAgentService; + private static ISimulationService m_SimulationService; - UUID m_ScopeID; - bool m_AllowTeleportsToAnyRegion; - string m_ExternalName; - GridRegion m_DefaultGatewayRegion; + private static UUID m_ScopeID; + private static bool m_AllowTeleportsToAnyRegion; + private static string m_ExternalName; + private static GridRegion m_DefaultGatewayRegion; public GatekeeperService(IConfigSource config, ISimulationService simService) { - IConfig serverConfig = config.Configs["GatekeeperService"]; - if (serverConfig == null) - throw new Exception(String.Format("No section GatekeeperService in config file")); + if (!m_Initialized) + { + m_Initialized = true; - string accountService = serverConfig.GetString("UserAccountService", String.Empty); - string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty); - string gridService = serverConfig.GetString("GridService", String.Empty); - string presenceService = serverConfig.GetString("PresenceService", String.Empty); - string simulationService = serverConfig.GetString("SimulationService", String.Empty); + IConfig serverConfig = config.Configs["GatekeeperService"]; + if (serverConfig == null) + throw new Exception(String.Format("No section GatekeeperService in config file")); - //m_AuthDll = serverConfig.GetString("AuthenticationService", String.Empty); + string accountService = serverConfig.GetString("UserAccountService", String.Empty); + string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty); + string gridService = serverConfig.GetString("GridService", String.Empty); + string presenceService = serverConfig.GetString("PresenceService", String.Empty); + string simulationService = serverConfig.GetString("SimulationService", String.Empty); - // These 3 are mandatory, the others aren't - if (gridService == string.Empty || presenceService == string.Empty || m_AuthDll == string.Empty) - throw new Exception("Incomplete specifications, Gatekeeper Service cannot function."); - - string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString()); - UUID.TryParse(scope, out m_ScopeID); - //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); - m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); - m_ExternalName = serverConfig.GetString("ExternalName", string.Empty); + // These 3 are mandatory, the others aren't + if (gridService == string.Empty || presenceService == string.Empty) + throw new Exception("Incomplete specifications, Gatekeeper Service cannot function."); + + string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString()); + UUID.TryParse(scope, out m_ScopeID); + //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); + m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); + m_ExternalName = serverConfig.GetString("ExternalName", string.Empty); - Object[] args = new Object[] { config }; - m_GridService = ServerUtils.LoadPlugin(gridService, args); - m_PresenceService = ServerUtils.LoadPlugin(presenceService, args); + Object[] args = new Object[] { config }; + m_GridService = ServerUtils.LoadPlugin(gridService, args); + m_PresenceService = ServerUtils.LoadPlugin(presenceService, args); - if (accountService != string.Empty) - m_UserAccountService = ServerUtils.LoadPlugin(accountService, args); - if (homeUsersService != string.Empty) - m_UserAgentService = ServerUtils.LoadPlugin(homeUsersService, args); + if (accountService != string.Empty) + m_UserAccountService = ServerUtils.LoadPlugin(accountService, args); + if (homeUsersService != string.Empty) + m_UserAgentService = ServerUtils.LoadPlugin(homeUsersService, args); - if (simService != null) - m_SimulationService = simService; - else if (simulationService != string.Empty) - m_SimulationService = ServerUtils.LoadPlugin(simulationService, args); + if (simService != null) + m_SimulationService = simService; + else if (simulationService != string.Empty) + m_SimulationService = ServerUtils.LoadPlugin(simulationService, args); - if (m_GridService == null || m_PresenceService == null || m_SimulationService == null) - throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function."); + if (m_GridService == null || m_PresenceService == null || m_SimulationService == null) + throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function."); - m_log.Debug("[GATEKEEPER SERVICE]: Starting..."); + m_log.Debug("[GATEKEEPER SERVICE]: Starting..."); + } } public GatekeeperService(IConfigSource config) diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index aec82e8868..4bee4b5ed5 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -61,7 +61,8 @@ namespace OpenSim.Services.HypergridService protected static IGridUserService m_GridUserService; protected static IGridService m_GridService; - protected static GatekeeperServiceConnector m_GatekeeperConnector; + //protected static GatekeeperServiceConnector m_GatekeeperConnector; + protected static IGatekeeperService m_GatekeeperService; protected static bool m_BypassClientVerification; @@ -69,6 +70,8 @@ namespace OpenSim.Services.HypergridService { if (!m_Initialized) { + m_Initialized = true; + m_log.DebugFormat("[HOME USERS SECURITY]: Starting..."); IConfig serverConfig = config.Configs["UserAgentService"]; @@ -77,18 +80,18 @@ namespace OpenSim.Services.HypergridService string gridService = serverConfig.GetString("GridService", String.Empty); string gridUserService = serverConfig.GetString("GridUserService", String.Empty); + string gatekeeperService = serverConfig.GetString("GatekeeperService", String.Empty); m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false); - if (gridService == string.Empty || gridUserService == string.Empty) + if (gridService == string.Empty || gridUserService == string.Empty || gatekeeperService == string.Empty) throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function.")); Object[] args = new Object[] { config }; m_GridService = ServerUtils.LoadPlugin(gridService, args); m_GridUserService = ServerUtils.LoadPlugin(gridUserService, args); - m_GatekeeperConnector = new GatekeeperServiceConnector(); - - m_Initialized = true; + //m_GatekeeperConnector = new GatekeeperServiceConnector(); + m_GatekeeperService = ServerUtils.LoadPlugin(gatekeeperService, args); } } @@ -135,7 +138,8 @@ namespace OpenSim.Services.HypergridService agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); - bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); + //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); + bool success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); if (!success) { diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 0cf9ab1431..9269e39d89 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -207,6 +207,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 ;; for the service GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" GridService = "OpenSim.Services.GridService.dll:GridService" + GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService" ;; The interface that local users get when they are in other grids. ;; This restricts the inventory operations while in other grids. diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini index e87270d7e8..35e7da26ed 100644 --- a/bin/config-include/StandaloneHypergrid.ini +++ b/bin/config-include/StandaloneHypergrid.ini @@ -114,6 +114,8 @@ ;; for the service GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" GridService = "OpenSim.Services.GridService.dll:GridService" + GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService" + ;; The interface that local users get when they are in other grids ;; This greatly restricts the inventory operations while in other grids From 16bdb53683bf15a39f77603d558eda026fd4d21e Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 4 Aug 2010 00:45:15 +0200 Subject: [PATCH 3/3] Allow specifying default region flags. Correct a typo. --- OpenSim/Services/GridService/GridService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index f49d86d50a..ebaed42dc5 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -124,7 +124,7 @@ namespace OpenSim.Services.GridService { // Regions reserved for the null key cannot be taken. if ((string)region.Data["PrincipalID"] == UUID.Zero.ToString()) - return "Region location us reserved"; + return "Region location is reserved"; // Treat it as an auth request // @@ -210,6 +210,7 @@ namespace OpenSim.Services.GridService { int newFlags = 0; string regionName = rdata.RegionName.Trim().Replace(' ', '_'); + newFlags = ParseFlags(newFlags, gridConfig.GetString("DefaultRegionFlags", String.Empty)); newFlags = ParseFlags(newFlags, gridConfig.GetString("Region_" + regionName, String.Empty)); newFlags = ParseFlags(newFlags, gridConfig.GetString("Region_" + rdata.RegionID.ToString(), String.Empty)); rdata.Data["flags"] = newFlags.ToString();