aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-19 22:45:03 +0000
committerJustin Clark-Casey (justincc)2012-03-19 22:45:03 +0000
commite2b1c569dad47d1b41186f22b351aa15ed3787eb (patch)
tree0d0c39d7021d48049810489f1a4711a821928064 /OpenSim
parentStop console command "xengine status" throwing an exception if there are no s... (diff)
downloadopensim-SC_OLD-e2b1c569dad47d1b41186f22b351aa15ed3787eb.zip
opensim-SC_OLD-e2b1c569dad47d1b41186f22b351aa15ed3787eb.tar.gz
opensim-SC_OLD-e2b1c569dad47d1b41186f22b351aa15ed3787eb.tar.bz2
opensim-SC_OLD-e2b1c569dad47d1b41186f22b351aa15ed3787eb.tar.xz
Fix a bug where logins to standalones would fail if the RegionReady module was not active
Unfortunately, the OnLoginsEnabled event is currently only guaranteed to fire if the RegionReady module is active. However, we can instantiate the AuthorizationService in the module RegionLoaded method since by this time all other modules will have been loaded
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs9
1 files changed, 2 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
index c982db6..267fb9e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
@@ -93,8 +93,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
93 93
94 scene.RegisterModuleInterface<IAuthorizationService>(this); 94 scene.RegisterModuleInterface<IAuthorizationService>(this);
95 m_Scene = scene; 95 m_Scene = scene;
96
97 scene.EventManager.OnLoginsEnabled += new EventManager.LoginsEnabled(OnLoginsEnabled);
98 } 96 }
99 97
100 public void RemoveRegion(Scene scene) 98 public void RemoveRegion(Scene scene)
@@ -106,16 +104,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
106 if (!m_Enabled) 104 if (!m_Enabled)
107 return; 105 return;
108 106
107 m_AuthorizationService = new AuthorizationService(m_AuthorizationConfig, m_Scene);
108
109 m_log.InfoFormat( 109 m_log.InfoFormat(
110 "[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}", 110 "[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}",
111 scene.RegionInfo.RegionName); 111 scene.RegionInfo.RegionName);
112 } 112 }
113 113
114 private void OnLoginsEnabled(string regionName)
115 {
116 m_AuthorizationService = new AuthorizationService(m_AuthorizationConfig, m_Scene);
117 }
118
119 public bool IsAuthorizedForRegion( 114 public bool IsAuthorizedForRegion(
120 string userID, string firstName, string lastName, string regionID, out string message) 115 string userID, string firstName, string lastName, string regionID, out string message)
121 { 116 {