From 88d2df597e499600357c86ad0b1a755a13e9c6b1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Dec 2009 16:34:02 -0800 Subject: [PATCH] * Fixed names. * Added configs for Standalone * Changed UserSericeBase to use useraccounts instead of user --- .../Resources/CoreModulePlugin.addin.xml | 6 ++---- .../LocalUserAccountServiceConnector.cs | 2 +- .../RemoteUserAccountServiceConnector.cs | 2 +- .../Services/UserService/UserServiceBase.cs | 19 ++++++++++++++----- bin/config-include/Standalone.ini | 6 +++++- bin/config-include/StandaloneHypergrid.ini | 6 +++++- 6 files changed, 28 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index a7acc437ac..e4b0fd5520 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -30,8 +30,6 @@ - - @@ -51,8 +49,8 @@ - - + + diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index e40d524812..ce8c3a552d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs @@ -37,7 +37,7 @@ using OpenSim.Services.Interfaces; using OpenMetaverse; -namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User +namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { public class LocalUserAccountServicesConnector : ISharedRegionModule, IUserAccountService { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index 0b72080f03..d322abad69 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs @@ -34,7 +34,7 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using OpenSim.Services.Connectors; -namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User +namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { public class RemoteUserAccountServicesConnector : UserAccountServicesConnector, ISharedRegionModule, IUserAccountService diff --git a/OpenSim/Services/UserService/UserServiceBase.cs b/OpenSim/Services/UserService/UserServiceBase.cs index fea8b019ff..70ed5941f9 100644 --- a/OpenSim/Services/UserService/UserServiceBase.cs +++ b/OpenSim/Services/UserService/UserServiceBase.cs @@ -40,20 +40,29 @@ namespace OpenSim.Services.UserAccountService public UserAccountServiceBase(IConfigSource config) : base(config) { + string dllName = String.Empty; + string connString = String.Empty; + string realm = "useraccounts"; + + IConfig dbConfig = config.Configs["DatabaseService"]; + if (dbConfig != null) + { + dllName = dbConfig.GetString("StorageProvider", String.Empty); + connString = dbConfig.GetString("ConnectionString", String.Empty); + } + IConfig userConfig = config.Configs["UserAccountService"]; if (userConfig == null) throw new Exception("No UserAccountService configuration"); - string dllName = userConfig.GetString("StorageProvider", - String.Empty); + dllName = userConfig.GetString("StorageProvider", dllName); if (dllName == String.Empty) throw new Exception("No StorageProvider configured"); - string connString = userConfig.GetString("ConnectionString", - String.Empty); + connString = userConfig.GetString("ConnectionString", connString); - string realm = userConfig.GetString("Realm", "users"); + realm = userConfig.GetString("Realm", realm); m_Database = LoadPlugin(dllName, new Object[] {connString, realm}); diff --git a/bin/config-include/Standalone.ini b/bin/config-include/Standalone.ini index c4cffb936d..3eb68a06d7 100644 --- a/bin/config-include/Standalone.ini +++ b/bin/config-include/Standalone.ini @@ -13,7 +13,8 @@ NeighbourServices = "LocalNeighbourServicesConnector" AuthorizationServices = "LocalAuthorizationServicesConnector" GridServices = "LocalGridServicesConnector" - PresenceServices ="LocalPresenceServicesConnector" + PresenceServices = "LocalPresenceServicesConnector" + UserAccountServices = "LocalUserAccountServicesConnector" LibraryModule = true [AssetService] @@ -31,3 +32,6 @@ [PresenceService] LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService" + +[UserAccountService] + LocalServiceModule = "OpenSim.Services.UserService.dll:UserAccountService" diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini index bd9de33d4c..4efc3018e7 100644 --- a/bin/config-include/StandaloneHypergrid.ini +++ b/bin/config-include/StandaloneHypergrid.ini @@ -16,7 +16,8 @@ NeighbourServices = "RemoteNeighbourServicesConnector" AuthorizationServices = "LocalAuthorizationServicesConnector" GridServices = "HGGridServicesConnector" - PresenceServices ="LocalPresenceServicesConnector" + PresenceServices = "LocalPresenceServicesConnector" + UserAccountServices = "LocalUserAccountServicesConnector" InventoryServiceInConnector = true AssetServiceInConnector = true HGAuthServiceInConnector = true @@ -56,3 +57,6 @@ [PresenceService] LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService" + +[UserAccountService] + LocalServiceModule = "OpenSim.Services.UserService.dll:UserAccountService"