diff options
author | Melanie Thielker | 2009-05-11 22:54:09 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-05-11 22:54:09 +0000 |
commit | 16efb78698fc505fb33ad87962b39047939d636c (patch) | |
tree | b5a52ac4bb450bec6a8f6e52a5a7e97db1335488 /OpenSim | |
parent | resolve a circular dependency (diff) | |
download | opensim-SC_OLD-16efb78698fc505fb33ad87962b39047939d636c.zip opensim-SC_OLD-16efb78698fc505fb33ad87962b39047939d636c.tar.gz opensim-SC_OLD-16efb78698fc505fb33ad87962b39047939d636c.tar.bz2 opensim-SC_OLD-16efb78698fc505fb33ad87962b39047939d636c.tar.xz |
Changes to the new user system to add the modularity developed for the asset
system
Diffstat (limited to 'OpenSim')
4 files changed, 51 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs index 1aaf552..bd4638a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset | |||
67 | IConfig assetConfig = source.Configs["AssetService"]; | 67 | IConfig assetConfig = source.Configs["AssetService"]; |
68 | if (assetConfig == null) | 68 | if (assetConfig == null) |
69 | { | 69 | { |
70 | m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini"); | 70 | m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini"); |
71 | return; | 71 | return; |
72 | } | 72 | } |
73 | 73 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs index 1528ef2..637931e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs | |||
@@ -25,16 +25,23 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
29 | using System.Reflection; | ||
30 | using log4net; | ||
28 | using Nini.Config; | 31 | using Nini.Config; |
29 | using OpenSim.Region.Framework.Interfaces; | 32 | using OpenSim.Region.Framework.Interfaces; |
30 | using OpenSim.Region.Framework.Scenes; | 33 | using OpenSim.Region.Framework.Scenes; |
34 | using OpenSim.Servers.Base; | ||
31 | using OpenSim.Services.Interfaces; | 35 | using OpenSim.Services.Interfaces; |
32 | using OpenSim.Services.UserService; | ||
33 | 36 | ||
34 | namespace OpenSim.Region.CoreModules.ServiceConnectors.User | 37 | namespace OpenSim.Region.CoreModules.ServiceConnectors.User |
35 | { | 38 | { |
36 | public class LocalUserServicesConnector : ISharedRegionModule | 39 | public class LocalUserServicesConnector : ISharedRegionModule |
37 | { | 40 | { |
41 | private static readonly ILog m_log = | ||
42 | LogManager.GetLogger( | ||
43 | MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
38 | private IUserService m_UserService; | 45 | private IUserService m_UserService; |
39 | 46 | ||
40 | private bool m_Enabled = false; | 47 | private bool m_Enabled = false; |
@@ -52,8 +59,34 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.User | |||
52 | string name = moduleConfig.GetString("UserServices", ""); | 59 | string name = moduleConfig.GetString("UserServices", ""); |
53 | if (name == Name) | 60 | if (name == Name) |
54 | { | 61 | { |
62 | IConfig userConfig = source.Configs["UserService"]; | ||
63 | if (userConfig == null) | ||
64 | { | ||
65 | m_log.Error("[USER CONNECTOR]: UserService missing from OpenSim.ini"); | ||
66 | return; | ||
67 | } | ||
68 | |||
69 | string serviceDll = userConfig.GetString("LocalServiceModule", | ||
70 | String.Empty); | ||
71 | |||
72 | if (serviceDll == String.Empty) | ||
73 | { | ||
74 | m_log.Error("[USER CONNECTOR]: No LocalServiceModule named in section UserService"); | ||
75 | return; | ||
76 | } | ||
77 | |||
78 | Object[] args = new Object[] { source }; | ||
79 | m_UserService = | ||
80 | ServerUtils.LoadPlugin<IUserService>(serviceDll, | ||
81 | args); | ||
82 | |||
83 | if (m_UserService == null) | ||
84 | { | ||
85 | m_log.Error("[USER CONNECTOR]: Can't load user service"); | ||
86 | return; | ||
87 | } | ||
55 | m_Enabled = true; | 88 | m_Enabled = true; |
56 | m_UserService = new UserService(source); | 89 | m_log.Info("[USER CONNECTOR]: Local user connector enabled"); |
57 | } | 90 | } |
58 | } | 91 | } |
59 | } | 92 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs index 58e52ac..e56aac5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs | |||
@@ -29,7 +29,6 @@ using Nini.Config; | |||
29 | using OpenSim.Region.Framework.Interfaces; | 29 | using OpenSim.Region.Framework.Interfaces; |
30 | using OpenSim.Region.Framework.Scenes; | 30 | using OpenSim.Region.Framework.Scenes; |
31 | using OpenSim.Services.Interfaces; | 31 | using OpenSim.Services.Interfaces; |
32 | using OpenSim.Services.UserService; | ||
33 | 32 | ||
34 | namespace OpenSim.Region.CoreModules.ServiceConnectors.User | 33 | namespace OpenSim.Region.CoreModules.ServiceConnectors.User |
35 | { | 34 | { |
diff --git a/OpenSim/Servers/User/UserServerConnector.cs b/OpenSim/Servers/User/UserServerConnector.cs index c20cc31..15b09bc 100644 --- a/OpenSim/Servers/User/UserServerConnector.cs +++ b/OpenSim/Servers/User/UserServerConnector.cs | |||
@@ -25,9 +25,10 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
28 | using Nini.Config; | 29 | using Nini.Config; |
30 | using OpenSim.Servers.Base; | ||
29 | using OpenSim.Services.Interfaces; | 31 | using OpenSim.Services.Interfaces; |
30 | using OpenSim.Services.UserService; | ||
31 | using OpenSim.Framework.Servers.HttpServer; | 32 | using OpenSim.Framework.Servers.HttpServer; |
32 | 33 | ||
33 | namespace OpenSim.Servers.UserServer | 34 | namespace OpenSim.Servers.UserServer |
@@ -38,7 +39,19 @@ namespace OpenSim.Servers.UserServer | |||
38 | 39 | ||
39 | public UserServiceConnector(IConfigSource config, IHttpServer server) | 40 | public UserServiceConnector(IConfigSource config, IHttpServer server) |
40 | { | 41 | { |
41 | m_UserService = new UserService(config); | 42 | IConfig serverConfig = config.Configs["UserService"]; |
43 | if (serverConfig == null) | ||
44 | throw new Exception("No section 'Server' in config file"); | ||
45 | |||
46 | string userService = serverConfig.GetString("LocalServiceModule", | ||
47 | String.Empty); | ||
48 | |||
49 | if (userService == String.Empty) | ||
50 | throw new Exception("No UserService in config file"); | ||
51 | |||
52 | Object[] args = new Object[] { config }; | ||
53 | m_UserService = | ||
54 | ServerUtils.LoadPlugin<IUserService>(userService, args); | ||
42 | } | 55 | } |
43 | } | 56 | } |
44 | } | 57 | } |