Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-08-04 00:33:02 +01:00
commit e12993ed22
4 changed files with 58 additions and 48 deletions

View File

@ -49,21 +49,25 @@ 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)
{
if (!m_Initialized)
{
m_Initialized = true;
IConfig serverConfig = config.Configs["GatekeeperService"];
if (serverConfig == null)
throw new Exception(String.Format("No section GatekeeperService in config file"));
@ -74,10 +78,8 @@ namespace OpenSim.Services.HypergridService
string presenceService = serverConfig.GetString("PresenceService", String.Empty);
string simulationService = serverConfig.GetString("SimulationService", String.Empty);
//m_AuthDll = serverConfig.GetString("AuthenticationService", String.Empty);
// 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.");
string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString());
@ -105,6 +107,7 @@ namespace OpenSim.Services.HypergridService
m_log.Debug("[GATEKEEPER SERVICE]: Starting...");
}
}
public GatekeeperService(IConfigSource config)
: this(config, null)

View File

@ -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<IGridService>(gridService, args);
m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
m_GatekeeperConnector = new GatekeeperServiceConnector();
m_Initialized = true;
//m_GatekeeperConnector = new GatekeeperServiceConnector();
m_GatekeeperService = ServerUtils.LoadPlugin<IGatekeeperService>(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)
{

View File

@ -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.

View File

@ -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