* Apply a modified version of http://opensimulator.org/mantis/view.php?id=2290
* This allows multiple user profile providers to be specified in OpenSim.ini separated by commas * If multiple providers are specified then a request for a user profile will query each in turn until the profile is either found or all have been queried * Unfortunately I don't believe this order can currently be specified, which if true is something that will need to be fixed. * Thanks to smeans for the original patch.0.6.0-stable
parent
a6df2011f7
commit
138bcf6fff
|
@ -178,7 +178,12 @@ namespace OpenSim.Framework.Communications
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return plugin.GetAgentByUUID(uuid);
|
UserAgentData result = plugin.GetAgentByUUID(uuid);
|
||||||
|
|
||||||
|
if (result != null)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -260,7 +265,12 @@ namespace OpenSim.Framework.Communications
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return plugin.GetUserFriendList(ownerID);
|
List<FriendListItem> result = plugin.GetUserFriendList(ownerID);
|
||||||
|
|
||||||
|
if (result != null)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -331,7 +341,6 @@ namespace OpenSim.Framework.Communications
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resets the currentAgent in the user profile
|
/// Resets the currentAgent in the user profile
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -344,6 +353,7 @@ namespace OpenSim.Framework.Communications
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
profile.CurrentAgent = null;
|
profile.CurrentAgent = null;
|
||||||
|
|
||||||
UpdateUserProfile(profile);
|
UpdateUserProfile(profile);
|
||||||
|
|
|
@ -342,20 +342,45 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Filters out which plugin to load based on its "Provider", which is name given by in the addin.xml
|
/// Filters out which plugin to load based on its the plugin name or names given. Plugin names are contained in
|
||||||
|
/// their addin.xml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PluginProviderFilter : IPluginFilter
|
public class PluginProviderFilter : IPluginFilter
|
||||||
{
|
{
|
||||||
private string provider;
|
private string[] m_filters;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p">
|
||||||
|
/// Plugin name or names on which to filter. Multiple names should be separated by commas.
|
||||||
|
/// </param>
|
||||||
public PluginProviderFilter(string p)
|
public PluginProviderFilter(string p)
|
||||||
{
|
{
|
||||||
provider = p;
|
m_filters = p.Split(',');
|
||||||
|
|
||||||
|
for (int i = 0; i < m_filters.Length; i++)
|
||||||
|
{
|
||||||
|
m_filters[i] = m_filters[i].Trim();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Apply this filter to the given plugin.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="plugin"></param>
|
||||||
|
/// <returns>true if the plugin's name matched one of the filters, false otherwise.</returns>
|
||||||
public bool Apply (PluginExtensionNode plugin)
|
public bool Apply (PluginExtensionNode plugin)
|
||||||
{
|
{
|
||||||
return (plugin.Provider == provider);
|
for (int i = 0; i < m_filters.Length; i++)
|
||||||
|
{
|
||||||
|
if (m_filters[i] == plugin.Provider)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The endpoint of a sender of a particular packet. The port is changed by the various socket receive methods
|
/// The endpoint of a sender of a particular packet. The port is changed by the various socket receive methods
|
||||||
/// </value>
|
/// </value>
|
||||||
protected EndPoint epSender;
|
protected EndPoint epSender = new IPEndPoint(IPAddress.Any, 0);
|
||||||
|
|
||||||
protected EndPoint epProxy;
|
protected EndPoint epProxy;
|
||||||
protected int proxyPortOffset;
|
protected int proxyPortOffset;
|
||||||
|
@ -175,7 +175,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <param name="result"></param>
|
/// <param name="result"></param>
|
||||||
protected virtual void OnReceivedData(IAsyncResult result)
|
protected virtual void OnReceivedData(IAsyncResult result)
|
||||||
{
|
{
|
||||||
epSender = new IPEndPoint(listenIP, 0);
|
|
||||||
Packet packet = null;
|
Packet packet = null;
|
||||||
|
|
||||||
int numBytes = 1;
|
int numBytes = 1;
|
||||||
|
|
|
@ -34,7 +34,6 @@ using OpenMetaverse;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Data.Base;
|
using OpenSim.Data.Base;
|
||||||
using OpenSim.Data.MapperFactory;
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
|
|
|
@ -144,6 +144,7 @@ asset_plugin = "OpenSim.Data.SQLite.dll"
|
||||||
inventory_plugin = "OpenSim.Data.SQLite.dll"
|
inventory_plugin = "OpenSim.Data.SQLite.dll"
|
||||||
; inventory_plugin = "OpenSim.Data.MySQL.dll"
|
; inventory_plugin = "OpenSim.Data.MySQL.dll"
|
||||||
; inventory_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate
|
; inventory_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate
|
||||||
|
|
||||||
; Inventory Source NHibernate example (DIALECT;DRIVER;CONNECTSTRING)
|
; Inventory Source NHibernate example (DIALECT;DRIVER;CONNECTSTRING)
|
||||||
; inventory_source = "SQLiteDialect;SqliteClientDriver;URI=file:Inventory.db,version=3"
|
; inventory_source = "SQLiteDialect;SqliteClientDriver;URI=file:Inventory.db,version=3"
|
||||||
; Inventory Source MySQL example
|
; Inventory Source MySQL example
|
||||||
|
@ -151,9 +152,17 @@ inventory_plugin = "OpenSim.Data.SQLite.dll"
|
||||||
|
|
||||||
|
|
||||||
; User Data Database provider
|
; User Data Database provider
|
||||||
|
;
|
||||||
|
; Multiple providers can be specified by separating them with commas (whitespace is unimportant)
|
||||||
|
; If multiple providers are specified then if a profile is requested, each is queried until one
|
||||||
|
; provides a valid profile, or until all providers have been queried.
|
||||||
|
; Unfortunately the order of querying is currently undefined (it may not be the order in which
|
||||||
|
; providers are specified here). This needs to be fixed
|
||||||
|
;
|
||||||
userDatabase_plugin = "OpenSim.Data.SQLite.dll"
|
userDatabase_plugin = "OpenSim.Data.SQLite.dll"
|
||||||
; userDatabase_plugin = "OpenSim.Data.MySQL.dll"
|
; userDatabase_plugin = "OpenSim.Data.MySQL.dll"
|
||||||
; userDatabase_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate
|
; userDatabase_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate
|
||||||
|
|
||||||
; User Source NHibernate Example (DIALECT;DRIVER;CONNECTSTRING)
|
; User Source NHibernate Example (DIALECT;DRIVER;CONNECTSTRING)
|
||||||
; user_source = "SQLiteDialect;SqliteClientDriver;URI=file:User.db,version=3"
|
; user_source = "SQLiteDialect;SqliteClientDriver;URI=file:User.db,version=3"
|
||||||
; User Source MySQL example
|
; User Source MySQL example
|
||||||
|
|
Loading…
Reference in New Issue