Changes to the new user system to add the modularity developed for the asset
system0.6.5-rc1
parent
4cd85e5c9e
commit
16efb78698
|
@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset
|
|||
IConfig assetConfig = source.Configs["AssetService"];
|
||||
if (assetConfig == null)
|
||||
{
|
||||
m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini");
|
||||
m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,16 +25,23 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Servers.Base;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Services.UserService;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.ServiceConnectors.User
|
||||
{
|
||||
public class LocalUserServicesConnector : ISharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IUserService m_UserService;
|
||||
|
||||
private bool m_Enabled = false;
|
||||
|
@ -52,8 +59,34 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.User
|
|||
string name = moduleConfig.GetString("UserServices", "");
|
||||
if (name == Name)
|
||||
{
|
||||
IConfig userConfig = source.Configs["UserService"];
|
||||
if (userConfig == null)
|
||||
{
|
||||
m_log.Error("[USER CONNECTOR]: UserService missing from OpenSim.ini");
|
||||
return;
|
||||
}
|
||||
|
||||
string serviceDll = userConfig.GetString("LocalServiceModule",
|
||||
String.Empty);
|
||||
|
||||
if (serviceDll == String.Empty)
|
||||
{
|
||||
m_log.Error("[USER CONNECTOR]: No LocalServiceModule named in section UserService");
|
||||
return;
|
||||
}
|
||||
|
||||
Object[] args = new Object[] { source };
|
||||
m_UserService =
|
||||
ServerUtils.LoadPlugin<IUserService>(serviceDll,
|
||||
args);
|
||||
|
||||
if (m_UserService == null)
|
||||
{
|
||||
m_log.Error("[USER CONNECTOR]: Can't load user service");
|
||||
return;
|
||||
}
|
||||
m_Enabled = true;
|
||||
m_UserService = new UserService(source);
|
||||
m_log.Info("[USER CONNECTOR]: Local user connector enabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ using Nini.Config;
|
|||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Services.UserService;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.ServiceConnectors.User
|
||||
{
|
||||
|
|
|
@ -25,9 +25,10 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using Nini.Config;
|
||||
using OpenSim.Servers.Base;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Services.UserService;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
|
||||
namespace OpenSim.Servers.UserServer
|
||||
|
@ -38,7 +39,19 @@ namespace OpenSim.Servers.UserServer
|
|||
|
||||
public UserServiceConnector(IConfigSource config, IHttpServer server)
|
||||
{
|
||||
m_UserService = new UserService(config);
|
||||
IConfig serverConfig = config.Configs["UserService"];
|
||||
if (serverConfig == null)
|
||||
throw new Exception("No section 'Server' in config file");
|
||||
|
||||
string userService = serverConfig.GetString("LocalServiceModule",
|
||||
String.Empty);
|
||||
|
||||
if (userService == String.Empty)
|
||||
throw new Exception("No UserService in config file");
|
||||
|
||||
Object[] args = new Object[] { config };
|
||||
m_UserService =
|
||||
ServerUtils.LoadPlugin<IUserService>(userService, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
port = 8002
|
||||
|
||||
[UserService]
|
||||
LocalServiceModule = "OpenSim.Services.UserService.dll:UserService"
|
||||
StorageProvider = "OpenSim.Data.MySQL.dll"
|
||||
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim;"
|
||||
|
|
|
@ -1277,6 +1277,11 @@
|
|||
|
||||
;AssetCaching = "CoreAssetCache"
|
||||
|
||||
; Choose one
|
||||
;UserServices = "LocalUserServicesConnector"
|
||||
;UserServices = "RemoteUserServicesConnector"
|
||||
|
||||
|
||||
[AssetService]
|
||||
; Parameters for local assets
|
||||
;LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
|
||||
|
@ -1297,3 +1302,6 @@
|
|||
[AssetCache]
|
||||
; Number of buckets for assets
|
||||
;CacheBuckets = 32768
|
||||
|
||||
[UserService]
|
||||
;LocalServiceModule = "OpenSim.Services.UserService.dll:UserService"
|
||||
|
|
|
@ -1374,7 +1374,6 @@
|
|||
<Reference name="OpenSim.Servers.Base"/>
|
||||
<Reference name="OpenSim.Services.Base" />
|
||||
<Reference name="OpenSim.Services.Interfaces"/>
|
||||
<Reference name="OpenSim.Services.UserService"/>
|
||||
<Reference name="Nini.dll" />
|
||||
<Reference name="log4net.dll"/>
|
||||
|
||||
|
@ -1442,7 +1441,6 @@
|
|||
<Reference name="OpenSim.Servers.Base" />
|
||||
<Reference name="OpenSim.Services.Base" />
|
||||
<Reference name="OpenSim.Services.Interfaces" />
|
||||
<Reference name="OpenSim.Services.UserService" />
|
||||
<Reference name="OpenSim.Framework.Serialization"/>
|
||||
<Reference name="OpenSim.Framework.Console"/>
|
||||
<Reference name="OpenSim.Framework.Servers"/>
|
||||
|
|
Loading…
Reference in New Issue