aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2009-05-11 22:54:09 +0000
committerMelanie Thielker2009-05-11 22:54:09 +0000
commit16efb78698fc505fb33ad87962b39047939d636c (patch)
treeb5a52ac4bb450bec6a8f6e52a5a7e97db1335488 /OpenSim
parentresolve a circular dependency (diff)
downloadopensim-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')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectors/Asset/LocalAssetServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs37
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs1
-rw-r--r--OpenSim/Servers/User/UserServerConnector.cs17
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
28using System;
29using System.Reflection;
30using log4net;
28using Nini.Config; 31using Nini.Config;
29using OpenSim.Region.Framework.Interfaces; 32using OpenSim.Region.Framework.Interfaces;
30using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
34using OpenSim.Servers.Base;
31using OpenSim.Services.Interfaces; 35using OpenSim.Services.Interfaces;
32using OpenSim.Services.UserService;
33 36
34namespace OpenSim.Region.CoreModules.ServiceConnectors.User 37namespace 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;
29using OpenSim.Region.Framework.Interfaces; 29using OpenSim.Region.Framework.Interfaces;
30using OpenSim.Region.Framework.Scenes; 30using OpenSim.Region.Framework.Scenes;
31using OpenSim.Services.Interfaces; 31using OpenSim.Services.Interfaces;
32using OpenSim.Services.UserService;
33 32
34namespace OpenSim.Region.CoreModules.ServiceConnectors.User 33namespace 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
28using System;
28using Nini.Config; 29using Nini.Config;
30using OpenSim.Servers.Base;
29using OpenSim.Services.Interfaces; 31using OpenSim.Services.Interfaces;
30using OpenSim.Services.UserService;
31using OpenSim.Framework.Servers.HttpServer; 32using OpenSim.Framework.Servers.HttpServer;
32 33
33namespace OpenSim.Servers.UserServer 34namespace 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}