mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
Merge branch 'master' into careminster-presence-refactor
The modules will need to be updated for this to compile and run again. Please don't use until I do the companion commit to modules later on.
This commit is contained in:
@@ -37,6 +37,7 @@ using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Services.Connectors;
|
||||
using OpenSim.Services.Connectors.SimianGrid;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||
@@ -538,12 +539,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||
}
|
||||
else
|
||||
{
|
||||
// We're instantiating this class explicitly, but this won't
|
||||
// work in general, because the remote grid may be running
|
||||
// an inventory server that has a different protocol.
|
||||
// Eventually we will want a piece of protocol asking
|
||||
// the remote server about its kind. Definitely cool thing to do!
|
||||
connector = new RemoteXInventoryServicesConnector(url);
|
||||
// Still not as flexible as I would like this to be,
|
||||
// but good enough for now
|
||||
string connectorType = new HeloServicesConnector(url).Helo();
|
||||
m_log.DebugFormat("[HG INVENTORY SERVICE]: HELO returned {0}", connectorType);
|
||||
if (connectorType == "opensim-simian")
|
||||
connector = new SimianInventoryServiceConnector(url);
|
||||
else
|
||||
connector = new RemoteXInventoryServicesConnector(url);
|
||||
m_connectors.Add(url, connector);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||
return folders[type];
|
||||
}
|
||||
|
||||
m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID);
|
||||
m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}",
|
||||
// item.Name, item.Owner, item.Folder);
|
||||
// item.Name, item.Owner, item.Folder);
|
||||
|
||||
return m_InventoryService.AddItem(item);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||
public bool AddItem(InventoryItemBase item)
|
||||
{
|
||||
if (item == null)
|
||||
return false;
|
||||
return false;
|
||||
|
||||
return m_RemoteConnector.AddItem(item);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
{
|
||||
public class UserAccountCache
|
||||
{
|
||||
private const double CACHE_EXPIRATION_SECONDS = 120.0;
|
||||
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -51,9 +53,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
public void Cache(UUID userID, UserAccount account)
|
||||
{
|
||||
// Cache even null accounts
|
||||
m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromMinutes(2.0d));
|
||||
m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS));
|
||||
if (account != null)
|
||||
m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromMinutes(2.0d));
|
||||
m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS));
|
||||
|
||||
// m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user