*** CHANGED CONFIG BEHAVIOUR ***
* Changed really strange LocalSettings behaviour with enforcing hard-coded plugin names if none supplied * UserServices and InventoryPlugin will only load if supplied with filenameafrisby
parent
a9a126063f
commit
5818958a9a
|
@ -22,6 +22,8 @@ namespace OpenSim.Framework.InventoryServiceBase
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="FileName">The filename to the user server plugin DLL</param>
|
/// <param name="FileName">The filename to the user server plugin DLL</param>
|
||||||
public void AddPlugin(string FileName)
|
public void AddPlugin(string FileName)
|
||||||
|
{
|
||||||
|
if (!String.IsNullOrEmpty(FileName))
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("Inventory", "Inventorystorage: Attempting to load " + FileName);
|
MainLog.Instance.Verbose("Inventory", "Inventorystorage: Attempting to load " + FileName);
|
||||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||||
|
@ -34,17 +36,15 @@ namespace OpenSim.Framework.InventoryServiceBase
|
||||||
|
|
||||||
if (typeInterface != null)
|
if (typeInterface != null)
|
||||||
{
|
{
|
||||||
IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
IInventoryData plug =
|
||||||
|
(IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||||
plug.Initialise();
|
plug.Initialise();
|
||||||
this.m_plugins.Add(plug.getName(), plug);
|
this.m_plugins.Add(plug.getName(), plug);
|
||||||
MainLog.Instance.Verbose("Inventorystorage: Added IInventoryData Interface");
|
MainLog.Instance.Verbose("Inventorystorage: Added IInventoryData Interface");
|
||||||
}
|
}
|
||||||
|
|
||||||
typeInterface = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
pluginAssembly = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -32,15 +33,11 @@ using System.Reflection;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
|
using OpenSim.Framework.Configuration;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Data;
|
using OpenSim.Framework.Data;
|
||||||
using OpenSim.Framework.Interfaces;
|
|
||||||
using OpenSim.Framework.Inventory;
|
|
||||||
using OpenSim.Framework.Utilities;
|
using OpenSim.Framework.Utilities;
|
||||||
|
|
||||||
using OpenSim.Framework.Configuration;
|
|
||||||
using InventoryFolder = OpenSim.Framework.Inventory.InventoryFolder;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.UserManagement
|
namespace OpenSim.Framework.UserManagement
|
||||||
{
|
{
|
||||||
public abstract class UserManagerBase
|
public abstract class UserManagerBase
|
||||||
|
@ -53,6 +50,8 @@ namespace OpenSim.Framework.UserManagement
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="FileName">The filename to the user server plugin DLL</param>
|
/// <param name="FileName">The filename to the user server plugin DLL</param>
|
||||||
public void AddPlugin(string FileName)
|
public void AddPlugin(string FileName)
|
||||||
|
{
|
||||||
|
if (!String.IsNullOrEmpty(FileName))
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("Userstorage: Attempting to load " + FileName);
|
MainLog.Instance.Verbose("Userstorage: Attempting to load " + FileName);
|
||||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||||
|
@ -66,20 +65,18 @@ namespace OpenSim.Framework.UserManagement
|
||||||
|
|
||||||
if (typeInterface != null)
|
if (typeInterface != null)
|
||||||
{
|
{
|
||||||
IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
IUserData plug =
|
||||||
plug.Initialise();
|
(IUserData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||||
AddPlugin(plug);
|
AddPlugin(plug);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
typeInterface = null;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginAssembly = null;
|
public void AddPlugin(IUserData plug)
|
||||||
}
|
|
||||||
|
|
||||||
private void AddPlugin(IUserData plug)
|
|
||||||
{
|
{
|
||||||
|
plug.Initialise();
|
||||||
this._plugins.Add(plug.getName(), plug);
|
this._plugins.Add(plug.getName(), plug);
|
||||||
MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface");
|
MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface");
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,8 +79,8 @@ namespace OpenSim
|
||||||
|
|
||||||
private bool standaloneAuthenticate = false;
|
private bool standaloneAuthenticate = false;
|
||||||
private string standaloneWelcomeMessage = null;
|
private string standaloneWelcomeMessage = null;
|
||||||
private string standaloneInventoryPlugin = "";
|
private string standaloneInventoryPlugin = "OpenSim.Framework.Data.SQLite.dll";
|
||||||
private string standaloneUserPlugin = "";
|
private string standaloneUserPlugin = "OpenSim.Framework.Data.DB4o.dll";
|
||||||
|
|
||||||
private string m_assetStorage = "db4o";
|
private string m_assetStorage = "db4o";
|
||||||
|
|
||||||
|
|
|
@ -136,25 +136,19 @@ namespace OpenSim.Region.Communications.Local
|
||||||
|
|
||||||
public class LocalSettings
|
public class LocalSettings
|
||||||
{
|
{
|
||||||
public string WelcomeMessage = "";
|
public string WelcomeMessage;
|
||||||
public bool AccountAuthentication = false;
|
public bool AccountAuthentication = false;
|
||||||
public string InventoryPlugin = "OpenSim.Framework.Data.SQLite.dll";
|
public string InventoryPlugin;
|
||||||
public string UserDatabasePlugin = "OpenSim.Framework.Data.DB4o.dll";
|
public string UserDatabasePlugin;
|
||||||
|
|
||||||
public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin, string userPlugin)
|
public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin, string userPlugin)
|
||||||
{
|
{
|
||||||
WelcomeMessage = welcomeMessage;
|
WelcomeMessage = welcomeMessage;
|
||||||
AccountAuthentication = accountsAuthenticate;
|
AccountAuthentication = accountsAuthenticate;
|
||||||
if (inventoryPlugin != "")
|
|
||||||
{
|
|
||||||
InventoryPlugin = inventoryPlugin;
|
InventoryPlugin = inventoryPlugin;
|
||||||
}
|
|
||||||
if (userPlugin != "")
|
|
||||||
{
|
|
||||||
UserDatabasePlugin = userPlugin;
|
UserDatabasePlugin = userPlugin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue