From 53ba245967c58f574f58b1d99e077f30985ee7ad Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 6 Aug 2009 18:43:53 -0700 Subject: HGAuthenticationService must be a singleton, because it has in-memory state. This makes this singleton register with IScene, so that other parts can retrieve its reference. --- OpenSim/Server/Handlers/Authentication/HGAuthServerConnector.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Authentication/HGAuthServerConnector.cs b/OpenSim/Server/Handlers/Authentication/HGAuthServerConnector.cs index 2d31564..f4f8309 100644 --- a/OpenSim/Server/Handlers/Authentication/HGAuthServerConnector.cs +++ b/OpenSim/Server/Handlers/Authentication/HGAuthServerConnector.cs @@ -27,6 +27,7 @@ using System; using Nini.Config; +using OpenSim.Framework; using OpenSim.Server.Base; using OpenSim.Services.Interfaces; using OpenSim.Framework.Servers.HttpServer; @@ -38,7 +39,7 @@ namespace OpenSim.Server.Handlers.Authentication { private IAuthenticationService m_AuthenticationService; - public HGAuthServiceInConnector(IConfigSource config, IHttpServer server) : + public HGAuthServiceInConnector(IConfigSource config, IHttpServer server, IScene registry) : base(config, server) { IConfig serverConfig = config.Configs["AuthenticationService"]; @@ -53,6 +54,7 @@ namespace OpenSim.Server.Handlers.Authentication Object[] args = new Object[] { config }; m_AuthenticationService = ServerUtils.LoadPlugin(authenticationService, args); + registry.RegisterModuleInterface(m_AuthenticationService); HGAuthenticationHandlers m_handlers = new HGAuthenticationHandlers(m_AuthenticationService); server.AddXmlRPCHandler("hg_new_auth_key", m_handlers.GenerateKeyMethod); -- cgit v1.1