diff options
author | Diva Canto | 2009-08-06 18:43:53 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-06 18:43:53 -0700 |
commit | 53ba245967c58f574f58b1d99e077f30985ee7ad (patch) | |
tree | 7b45b07e02a34891a4452ab2071c86164a9639f0 /OpenSim | |
parent | Added missing trailing slash in AuthenticationService. (diff) | |
download | opensim-SC_OLD-53ba245967c58f574f58b1d99e077f30985ee7ad.zip opensim-SC_OLD-53ba245967c58f574f58b1d99e077f30985ee7ad.tar.gz opensim-SC_OLD-53ba245967c58f574f58b1d99e077f30985ee7ad.tar.bz2 opensim-SC_OLD-53ba245967c58f574f58b1d99e077f30985ee7ad.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/HGAuthServiceInConnectorModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Authentication/HGAuthServerConnector.cs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/HGAuthServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/HGAuthServiceInConnectorModule.cs index f4ebc70..6f2371d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/HGAuthServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/HGAuthServiceInConnectorModule.cs | |||
@@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication | |||
99 | if (!m_Registered) | 99 | if (!m_Registered) |
100 | { | 100 | { |
101 | m_Registered = true; | 101 | m_Registered = true; |
102 | new HGAuthServiceInConnector(m_Config, MainServer.Instance); | 102 | new HGAuthServiceInConnector(m_Config, MainServer.Instance, scene); |
103 | 103 | ||
104 | //Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer }; | 104 | //Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer }; |
105 | //ServerUtils.LoadPlugin<IAuthenticationService>("OpenSim.Server.Handlers.dll:HGAuthServiceInConnector", args); | 105 | //ServerUtils.LoadPlugin<IAuthenticationService>("OpenSim.Server.Handlers.dll:HGAuthServiceInConnector", args); |
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 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using Nini.Config; | 29 | using Nini.Config; |
30 | using OpenSim.Framework; | ||
30 | using OpenSim.Server.Base; | 31 | using OpenSim.Server.Base; |
31 | using OpenSim.Services.Interfaces; | 32 | using OpenSim.Services.Interfaces; |
32 | using OpenSim.Framework.Servers.HttpServer; | 33 | using OpenSim.Framework.Servers.HttpServer; |
@@ -38,7 +39,7 @@ namespace OpenSim.Server.Handlers.Authentication | |||
38 | { | 39 | { |
39 | private IAuthenticationService m_AuthenticationService; | 40 | private IAuthenticationService m_AuthenticationService; |
40 | 41 | ||
41 | public HGAuthServiceInConnector(IConfigSource config, IHttpServer server) : | 42 | public HGAuthServiceInConnector(IConfigSource config, IHttpServer server, IScene registry) : |
42 | base(config, server) | 43 | base(config, server) |
43 | { | 44 | { |
44 | IConfig serverConfig = config.Configs["AuthenticationService"]; | 45 | IConfig serverConfig = config.Configs["AuthenticationService"]; |
@@ -53,6 +54,7 @@ namespace OpenSim.Server.Handlers.Authentication | |||
53 | 54 | ||
54 | Object[] args = new Object[] { config }; | 55 | Object[] args = new Object[] { config }; |
55 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authenticationService, args); | 56 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authenticationService, args); |
57 | registry.RegisterModuleInterface<IAuthenticationService>(m_AuthenticationService); | ||
56 | 58 | ||
57 | HGAuthenticationHandlers m_handlers = new HGAuthenticationHandlers(m_AuthenticationService); | 59 | HGAuthenticationHandlers m_handlers = new HGAuthenticationHandlers(m_AuthenticationService); |
58 | server.AddXmlRPCHandler("hg_new_auth_key", m_handlers.GenerateKeyMethod); | 60 | server.AddXmlRPCHandler("hg_new_auth_key", m_handlers.GenerateKeyMethod); |