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 !!!###!!!0.7.0.1-release
parent
df976c9eb4
commit
62ffc566c3
|
@ -49,61 +49,64 @@ namespace OpenSim.Services.HypergridService
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
IGridService m_GridService;
|
private static bool m_Initialized = false;
|
||||||
IPresenceService m_PresenceService;
|
|
||||||
IUserAccountService m_UserAccountService;
|
|
||||||
IUserAgentService m_UserAgentService;
|
|
||||||
ISimulationService m_SimulationService;
|
|
||||||
|
|
||||||
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;
|
private static UUID m_ScopeID;
|
||||||
bool m_AllowTeleportsToAnyRegion;
|
private static bool m_AllowTeleportsToAnyRegion;
|
||||||
string m_ExternalName;
|
private static string m_ExternalName;
|
||||||
GridRegion m_DefaultGatewayRegion;
|
private static GridRegion m_DefaultGatewayRegion;
|
||||||
|
|
||||||
public GatekeeperService(IConfigSource config, ISimulationService simService)
|
public GatekeeperService(IConfigSource config, ISimulationService simService)
|
||||||
{
|
{
|
||||||
IConfig serverConfig = config.Configs["GatekeeperService"];
|
if (!m_Initialized)
|
||||||
if (serverConfig == null)
|
{
|
||||||
throw new Exception(String.Format("No section GatekeeperService in config file"));
|
m_Initialized = true;
|
||||||
|
|
||||||
string accountService = serverConfig.GetString("UserAccountService", String.Empty);
|
IConfig serverConfig = config.Configs["GatekeeperService"];
|
||||||
string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty);
|
if (serverConfig == null)
|
||||||
string gridService = serverConfig.GetString("GridService", String.Empty);
|
throw new Exception(String.Format("No section GatekeeperService in config file"));
|
||||||
string presenceService = serverConfig.GetString("PresenceService", String.Empty);
|
|
||||||
string simulationService = serverConfig.GetString("SimulationService", String.Empty);
|
|
||||||
|
|
||||||
//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
|
// These 3 are mandatory, the others aren't
|
||||||
if (gridService == string.Empty || presenceService == string.Empty || m_AuthDll == string.Empty)
|
if (gridService == string.Empty || presenceService == string.Empty)
|
||||||
throw new Exception("Incomplete specifications, Gatekeeper Service cannot function.");
|
throw new Exception("Incomplete specifications, Gatekeeper Service cannot function.");
|
||||||
|
|
||||||
string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString());
|
string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString());
|
||||||
UUID.TryParse(scope, out m_ScopeID);
|
UUID.TryParse(scope, out m_ScopeID);
|
||||||
//m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
|
//m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
|
||||||
m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true);
|
m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true);
|
||||||
m_ExternalName = serverConfig.GetString("ExternalName", string.Empty);
|
m_ExternalName = serverConfig.GetString("ExternalName", string.Empty);
|
||||||
|
|
||||||
Object[] args = new Object[] { config };
|
Object[] args = new Object[] { config };
|
||||||
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
|
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
|
||||||
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
|
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
|
||||||
|
|
||||||
if (accountService != string.Empty)
|
if (accountService != string.Empty)
|
||||||
m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
|
m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
|
||||||
if (homeUsersService != string.Empty)
|
if (homeUsersService != string.Empty)
|
||||||
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(homeUsersService, args);
|
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(homeUsersService, args);
|
||||||
|
|
||||||
if (simService != null)
|
if (simService != null)
|
||||||
m_SimulationService = simService;
|
m_SimulationService = simService;
|
||||||
else if (simulationService != string.Empty)
|
else if (simulationService != string.Empty)
|
||||||
m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args);
|
m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args);
|
||||||
|
|
||||||
if (m_GridService == null || m_PresenceService == null || m_SimulationService == null)
|
if (m_GridService == null || m_PresenceService == null || m_SimulationService == null)
|
||||||
throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function.");
|
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)
|
public GatekeeperService(IConfigSource config)
|
||||||
|
|
|
@ -61,7 +61,8 @@ namespace OpenSim.Services.HypergridService
|
||||||
|
|
||||||
protected static IGridUserService m_GridUserService;
|
protected static IGridUserService m_GridUserService;
|
||||||
protected static IGridService m_GridService;
|
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;
|
protected static bool m_BypassClientVerification;
|
||||||
|
|
||||||
|
@ -69,6 +70,8 @@ namespace OpenSim.Services.HypergridService
|
||||||
{
|
{
|
||||||
if (!m_Initialized)
|
if (!m_Initialized)
|
||||||
{
|
{
|
||||||
|
m_Initialized = true;
|
||||||
|
|
||||||
m_log.DebugFormat("[HOME USERS SECURITY]: Starting...");
|
m_log.DebugFormat("[HOME USERS SECURITY]: Starting...");
|
||||||
|
|
||||||
IConfig serverConfig = config.Configs["UserAgentService"];
|
IConfig serverConfig = config.Configs["UserAgentService"];
|
||||||
|
@ -77,18 +80,18 @@ namespace OpenSim.Services.HypergridService
|
||||||
|
|
||||||
string gridService = serverConfig.GetString("GridService", String.Empty);
|
string gridService = serverConfig.GetString("GridService", String.Empty);
|
||||||
string gridUserService = serverConfig.GetString("GridUserService", String.Empty);
|
string gridUserService = serverConfig.GetString("GridUserService", String.Empty);
|
||||||
|
string gatekeeperService = serverConfig.GetString("GatekeeperService", String.Empty);
|
||||||
|
|
||||||
m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false);
|
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."));
|
throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function."));
|
||||||
|
|
||||||
Object[] args = new Object[] { config };
|
Object[] args = new Object[] { config };
|
||||||
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
|
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
|
||||||
m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
|
m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
|
||||||
m_GatekeeperConnector = new GatekeeperServiceConnector();
|
//m_GatekeeperConnector = new GatekeeperServiceConnector();
|
||||||
|
m_GatekeeperService = ServerUtils.LoadPlugin<IGatekeeperService>(gatekeeperService, args);
|
||||||
m_Initialized = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +138,8 @@ namespace OpenSim.Services.HypergridService
|
||||||
agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random();
|
agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random();
|
||||||
TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
|
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)
|
if (!success)
|
||||||
{
|
{
|
||||||
|
|
|
@ -207,6 +207,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
;; for the service
|
;; for the service
|
||||||
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
|
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
|
||||||
GridService = "OpenSim.Services.GridService.dll:GridService"
|
GridService = "OpenSim.Services.GridService.dll:GridService"
|
||||||
|
GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService"
|
||||||
|
|
||||||
;; The interface that local users get when they are in other grids.
|
;; The interface that local users get when they are in other grids.
|
||||||
;; This restricts the inventory operations while in other grids.
|
;; This restricts the inventory operations while in other grids.
|
||||||
|
|
|
@ -114,6 +114,8 @@
|
||||||
;; for the service
|
;; for the service
|
||||||
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
|
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
|
||||||
GridService = "OpenSim.Services.GridService.dll:GridService"
|
GridService = "OpenSim.Services.GridService.dll:GridService"
|
||||||
|
GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService"
|
||||||
|
|
||||||
|
|
||||||
;; The interface that local users get when they are in other grids
|
;; The interface that local users get when they are in other grids
|
||||||
;; This greatly restricts the inventory operations while in other grids
|
;; This greatly restricts the inventory operations while in other grids
|
||||||
|
|
Loading…
Reference in New Issue