Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-05-03 01:40:24 +01:00
commit 9f8acbfe3e
25 changed files with 462 additions and 983 deletions

View File

@ -7,8 +7,8 @@
<property name="distbindir" value="distbin" />
<target name="distbin">
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
<copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/>
<delete dir="${distbindir}"/>
<!-- <copy file="*" todir="${distbindir}"/> -->
<copy todir="${distbindir}">
<fileset>
<include name="**"/>

View File

@ -1,4 +1,4 @@
== Building OpenSim ==
=== Building OpenSim ===
=== Building on Windows ===

View File

@ -0,0 +1,38 @@
BEGIN TRANSACTION;
CREATE TABLE inventoryfolders(
folderName varchar(255),
type integer,
version integer,
folderID varchar(255) primary key,
agentID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000');
CREATE TABLE inventoryitems(
assetID varchar(255),
assetType integer,
inventoryName varchar(255),
inventoryDescription varchar(255),
inventoryNextPermissions integer,
inventoryCurrentPermissions integer,
invType integer,
creatorID varchar(255),
inventoryBasePermissions integer,
inventoryEveryOnePermissions integer,
salePrice integer default 99,
saleType integer default 0,
creationDate integer default 2000,
groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
groupOwned integer default 0,
flags integer default 0,
inventoryID varchar(255) primary key,
parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
avatarID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
inventoryGroupPermissions integer not null default 0);
create index inventoryfolders_agentid on inventoryfolders(agentID);
create index inventoryfolders_parentid on inventoryfolders(parentFolderID);
create index inventoryitems_parentfolderid on inventoryitems(parentFolderID);
create index inventoryitems_avatarid on inventoryitems(avatarID);
COMMIT;

View File

@ -0,0 +1,9 @@
BEGIN TRANSACTION;
ATTACH 'inventoryStore.db' AS old;
INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders;
INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems;
COMMIT;

View File

@ -29,6 +29,8 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using Mono.Data.Sqlite;
@ -37,6 +39,8 @@ namespace OpenSim.Data.SQLite
{
public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string m_Realm;
private List<string> m_ColumnNames;
private int m_LastExpire;
@ -157,7 +161,7 @@ namespace OpenSim.Data.SQLite
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
m_log.Error("[SQLITE]: Exception storing authentication data", e);
//CloseCommand(cmd);
return false;
}

View File

@ -59,7 +59,7 @@ namespace OpenSim.Data.SQLite
if (!m_initialized)
{
m_Connection = new SqliteConnection(connectionString);
Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString));
//Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString));
m_Connection.Open();
if (storeName != String.Empty)

View File

@ -49,7 +49,7 @@ namespace OpenSim.Data.SQLite
public SQLiteXInventoryData(string conn, string realm)
{
m_Folders = new SQLiteGenericTableHandler<XInventoryFolder>(
conn, "inventoryfolders", "InventoryStore");
conn, "inventoryfolders", "XInventoryStore");
m_Items = new SqliteItemHandler(
conn, "inventoryitems", String.Empty);
}

View File

@ -29,6 +29,8 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using Mono.Data.SqliteClient;
@ -37,6 +39,8 @@ namespace OpenSim.Data.SQLiteLegacy
{
public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string m_Realm;
private List<string> m_ColumnNames;
private int m_LastExpire;
@ -162,7 +166,7 @@ namespace OpenSim.Data.SQLiteLegacy
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
m_log.Error("[SQLITE]: Exception storing authentication data", e);
CloseCommand(cmd);
return false;
}

View File

@ -122,6 +122,8 @@ namespace OpenSim.Framework
private int _type = 0;
private UUID _oldID;
private bool _ownerChanged = false;
public UUID AssetID {
get {
return _assetID;
@ -320,6 +322,15 @@ namespace OpenSim.Framework
}
}
public bool OwnerChanged {
get {
return _ownerChanged;
}
set {
_ownerChanged = value;
}
}
// See ICloneable
#region ICloneable Members

View File

@ -47,7 +47,6 @@
<RegionModule id="RemoteInventoryServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.RemoteInventoryServicesConnector" />
<RegionModule id="RemoteXInventoryServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.RemoteXInventoryServicesConnector" />
<RegionModule id="HGInventoryBroker" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.HGInventoryBroker" />
<RegionModule id="HGInventoryBroker2" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.HGInventoryBroker2" />
<RegionModule id="LocalNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.LocalNeighbourServicesConnector" />
<RegionModule id="RemoteNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.RemoteNeighbourServicesConnector" />
<RegionModule id="LocalLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.LocalLandServicesConnector" />

View File

@ -41,20 +41,21 @@ using OpenMetaverse;
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
{
public class HGInventoryBroker : BaseInventoryConnector, INonSharedRegionModule, IInventoryService
public class HGInventoryBroker : ISharedRegionModule, IInventoryService
{
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
private static bool m_Initialized = false;
private static bool m_Enabled = false;
private static IInventoryService m_GridService;
private static ISessionAuthInventoryService m_HGService;
private static IInventoryService m_LocalGridInventoryService;
private Dictionary<string, IInventoryService> m_connectors = new Dictionary<string, IInventoryService>();
private Scene m_Scene;
private IUserAccountService m_UserAccountService;
// A cache of userIDs --> ServiceURLs, for HGBroker only
protected Dictionary<UUID, string> m_InventoryURLs = new Dictionary<UUID,string>();
private List<Scene> m_Scenes = new List<Scene>();
public Type ReplaceableInterface
{
@ -68,67 +69,45 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public void Initialise(IConfigSource source)
{
if (!m_Initialized)
IConfig moduleConfig = source.Configs["Modules"];
if (moduleConfig != null)
{
IConfig moduleConfig = source.Configs["Modules"];
if (moduleConfig != null)
string name = moduleConfig.GetString("InventoryServices", "");
if (name == Name)
{
string name = moduleConfig.GetString("InventoryServices", "");
if (name == Name)
IConfig inventoryConfig = source.Configs["InventoryService"];
if (inventoryConfig == null)
{
IConfig inventoryConfig = source.Configs["InventoryService"];
if (inventoryConfig == null)
{
m_log.Error("[HG INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini");
return;
}
string localDll = inventoryConfig.GetString("LocalGridInventoryService",
String.Empty);
string HGDll = inventoryConfig.GetString("HypergridInventoryService",
String.Empty);
if (localDll == String.Empty)
{
m_log.Error("[HG INVENTORY CONNECTOR]: No LocalGridInventoryService named in section InventoryService");
//return;
throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's");
}
if (HGDll == String.Empty)
{
m_log.Error("[HG INVENTORY CONNECTOR]: No HypergridInventoryService named in section InventoryService");
//return;
throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's");
}
Object[] args = new Object[] { source };
m_GridService =
ServerUtils.LoadPlugin<IInventoryService>(localDll,
args);
m_HGService =
ServerUtils.LoadPlugin<ISessionAuthInventoryService>(HGDll,
args);
if (m_GridService == null)
{
m_log.Error("[HG INVENTORY CONNECTOR]: Can't load local inventory service");
return;
}
if (m_HGService == null)
{
m_log.Error("[HG INVENTORY CONNECTOR]: Can't load hypergrid inventory service");
return;
}
Init(source);
m_Enabled = true;
m_log.Info("[HG INVENTORY CONNECTOR]: HG inventory broker enabled");
m_log.Error("[HG INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini");
return;
}
string localDll = inventoryConfig.GetString("LocalGridInventoryService",
String.Empty);
//string HGDll = inventoryConfig.GetString("HypergridInventoryService",
// String.Empty);
if (localDll == String.Empty)
{
m_log.Error("[HG INVENTORY CONNECTOR]: No LocalGridInventoryService named in section InventoryService");
//return;
throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's");
}
Object[] args = new Object[] { source };
m_LocalGridInventoryService =
ServerUtils.LoadPlugin<IInventoryService>(localDll,
args);
if (m_LocalGridInventoryService == null)
{
m_log.Error("[HG INVENTORY CONNECTOR]: Can't load local inventory service");
return;
}
m_Enabled = true;
m_log.InfoFormat("[HG INVENTORY CONNECTOR]: HG inventory broker enabled with inner connector of type {0}", m_LocalGridInventoryService.GetType());
}
m_Initialized = true;
}
}
@ -145,11 +124,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (!m_Enabled)
return;
m_Scene = scene;
m_UserAccountService = m_Scene.UserAccountService;
m_Scenes.Add(scene);
scene.RegisterModuleInterface<IInventoryService>(this);
m_cache.AddRegion(scene);
scene.EventManager.OnClientClosed += OnClientClosed;
}
public void RemoveRegion(Scene scene)
@ -157,7 +137,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (!m_Enabled)
return;
m_cache.RemoveRegion(scene);
m_Scenes.Remove(scene);
}
public void RegionLoaded(Scene scene)
@ -169,260 +149,307 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
}
#region URL Cache
void OnClientClosed(UUID clientID, Scene scene)
{
if (m_InventoryURLs.ContainsKey(clientID)) // if it's in cache
{
ScenePresence sp = null;
foreach (Scene s in m_Scenes)
{
s.TryGetScenePresence(clientID, out sp);
if ((sp != null) && !sp.IsChildAgent && (s != scene))
{
m_log.DebugFormat("[INVENTORY CACHE]: OnClientClosed in {0}, but user {1} still in sim. Keeping inventoryURL in cache",
scene.RegionInfo.RegionName, clientID);
return;
}
}
DropInventoryServiceURL(clientID);
}
}
/// <summary>
/// Gets the user's inventory URL from its serviceURLs, if the user is foreign,
/// and sticks it in the cache
/// </summary>
/// <param name="userID"></param>
private void CacheInventoryServiceURL(UUID userID)
{
if (m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, userID) == null)
{
// The user does not have a local account; let's cache its service URL
string inventoryURL = string.Empty;
ScenePresence sp = null;
foreach (Scene scene in m_Scenes)
{
scene.TryGetScenePresence(userID, out sp);
if (sp != null)
{
AgentCircuitData aCircuit = scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
if (aCircuit.ServiceURLs.ContainsKey("InventoryServerURI"))
{
inventoryURL = aCircuit.ServiceURLs["InventoryServerURI"].ToString();
if (inventoryURL != null && inventoryURL != string.Empty)
{
inventoryURL = inventoryURL.Trim(new char[] { '/' });
m_InventoryURLs.Add(userID, inventoryURL);
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Added {0} to the cache of inventory URLs", inventoryURL);
return;
}
}
}
}
}
// else put a null; it means that the methods should forward to local grid's inventory
m_InventoryURLs.Add(userID, null);
}
private void DropInventoryServiceURL(UUID userID)
{
lock (m_InventoryURLs)
if (m_InventoryURLs.ContainsKey(userID))
{
string url = m_InventoryURLs[userID];
m_InventoryURLs.Remove(userID);
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Removed {0} from the cache of inventory URLs", url);
}
}
public string GetInventoryServiceURL(UUID userID)
{
if (m_InventoryURLs.ContainsKey(userID))
return m_InventoryURLs[userID];
else
CacheInventoryServiceURL(userID);
return m_InventoryURLs[userID];
}
#endregion
#region IInventoryService
public override bool CreateUserInventory(UUID userID)
public bool CreateUserInventory(UUID userID)
{
return m_GridService.CreateUserInventory(userID);
return m_LocalGridInventoryService.CreateUserInventory(userID);
}
public override List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
{
return m_GridService.GetInventorySkeleton(userId);
return m_LocalGridInventoryService.GetInventorySkeleton(userId);
}
public override InventoryCollection GetUserInventory(UUID userID)
public InventoryCollection GetUserInventory(UUID userID)
{
return null;
}
public override void GetUserInventory(UUID userID, InventoryReceiptCallback callback)
public void GetUserInventory(UUID userID, InventoryReceiptCallback callback)
{
}
// Inherited. See base
//public override InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
//{
// if (IsLocalGridUser(userID))
// return m_GridService.GetFolderForType(userID, type);
// else
// {
// UUID sessionID = GetSessionID(userID);
// string uri = GetUserInventoryURI(userID) + "/" + userID.ToString();
// // !!!!!!
// return null;
// //return m_HGService.GetFolderForType(uri, sessionID, type);
// }
//}
public override InventoryCollection GetFolderContent(UUID userID, UUID folderID)
public InventoryFolderBase GetRootFolder(UUID userID)
{
string uri = string.Empty;
if (!IsForeignUser(userID, out uri))
return m_GridService.GetFolderContent(userID, folderID);
else
{
UUID sessionID = GetSessionID(userID);
uri = uri + "/" + userID.ToString();
return m_HGService.GetFolderContent(uri, folderID, sessionID);
}
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetRootFolder for {0}", userID);
string invURL = GetInventoryServiceURL(userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetRootFolder(userID);
IInventoryService connector = GetConnector(invURL);
return connector.GetRootFolder(userID);
}
public override Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID)
public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
{
string uri = string.Empty;
if (!IsForeignUser(userID, out uri))
{
// This is not pretty, but it will have to do for now
if (m_GridService is BaseInventoryConnector)
{
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetSystemsFolders redirected to RemoteInventoryServiceConnector module");
return ((BaseInventoryConnector)m_GridService).GetSystemFolders(userID);
}
else
{
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetSystemsFolders redirected to GetSystemFoldersLocal");
return GetSystemFoldersLocal(userID);
}
}
else
{
UUID sessionID = GetSessionID(userID);
uri = uri + "/" + userID.ToString();
return m_HGService.GetSystemFolders(uri, sessionID);
}
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetFolderForType {0} type {1}", userID, type);
string invURL = GetInventoryServiceURL(userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetFolderForType(userID, type);
IInventoryService connector = GetConnector(invURL);
return connector.GetFolderForType(userID, type);
}
private Dictionary<AssetType, InventoryFolderBase> GetSystemFoldersLocal(UUID userID)
public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
{
InventoryFolderBase root = m_GridService.GetRootFolder(userID);
if (root != null)
{
InventoryCollection content = m_GridService.GetFolderContent(userID, root.ID);
if (content != null)
{
Dictionary<AssetType, InventoryFolderBase> folders = new Dictionary<AssetType, InventoryFolderBase>();
foreach (InventoryFolderBase folder in content.Folders)
{
//m_log.DebugFormat("[HG INVENTORY CONNECTOR]: scanning folder type {0}", (AssetType)folder.Type);
if ((folder.Type != (short)AssetType.Folder) && (folder.Type != (short)AssetType.Unknown))
folders[(AssetType)folder.Type] = folder;
}
// Put the root folder there, as type Folder
folders[AssetType.Folder] = root;
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: System folders count for {0}: {1}", userID, folders.Count);
return folders;
}
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Root folder content not found for {0}", userID);
m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolderContent " + folderID);
}
string invURL = GetInventoryServiceURL(userID);
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Root folder not found for {0}", userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetFolderContent(userID, folderID);
IInventoryService connector = GetConnector(invURL);
return connector.GetFolderContent(userID, folderID);
return new Dictionary<AssetType, InventoryFolderBase>();
}
public override List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{
string uri = string.Empty;
if (!IsForeignUser(userID, out uri))
return m_GridService.GetFolderItems(userID, folderID);
else
{
UUID sessionID = GetSessionID(userID);
uri = uri + "/" + userID.ToString();
return m_HGService.GetFolderItems(uri, folderID, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolderItems " + folderID);
string invURL = GetInventoryServiceURL(userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetFolderItems(userID, folderID);
IInventoryService connector = GetConnector(invURL);
return connector.GetFolderItems(userID, folderID);
}
public override bool AddFolder(InventoryFolderBase folder)
public bool AddFolder(InventoryFolderBase folder)
{
if (folder == null)
return false;
string uri = string.Empty;
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.AddFolder(folder);
else
{
UUID sessionID = GetSessionID(folder.Owner);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.AddFolder(uri, folder, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: AddFolder " + folder.ID);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.AddFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.AddFolder(folder);
}
public override bool UpdateFolder(InventoryFolderBase folder)
public bool UpdateFolder(InventoryFolderBase folder)
{
if (folder == null)
return false;
string uri = string.Empty;
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.UpdateFolder(folder);
else
{
UUID sessionID = GetSessionID(folder.Owner);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.UpdateFolder(uri, folder, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: UpdateFolder " + folder.ID);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.UpdateFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.UpdateFolder(folder);
}
public override bool DeleteFolders(UUID ownerID, List<UUID> folderIDs)
public bool DeleteFolders(UUID ownerID, List<UUID> folderIDs)
{
if (folderIDs == null)
return false;
if (folderIDs.Count == 0)
return false;
string uri = string.Empty;
if (!IsForeignUser(ownerID, out uri))
return m_GridService.DeleteFolders(ownerID, folderIDs);
else
{
UUID sessionID = GetSessionID(ownerID);
uri = uri + "/" + ownerID.ToString();
return m_HGService.DeleteFolders(uri, folderIDs, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: DeleteFolders for " + ownerID);
string invURL = GetInventoryServiceURL(ownerID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.DeleteFolders(ownerID, folderIDs);
IInventoryService connector = GetConnector(invURL);
return connector.DeleteFolders(ownerID, folderIDs);
}
public override bool MoveFolder(InventoryFolderBase folder)
public bool MoveFolder(InventoryFolderBase folder)
{
if (folder == null)
return false;
string uri = string.Empty;
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.MoveFolder(folder);
else
{
UUID sessionID = GetSessionID(folder.Owner);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.MoveFolder(uri, folder, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: MoveFolder for " + folder.Owner);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.MoveFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.MoveFolder(folder);
}
public override bool PurgeFolder(InventoryFolderBase folder)
public bool PurgeFolder(InventoryFolderBase folder)
{
if (folder == null)
return false;
string uri = string.Empty;
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.PurgeFolder(folder);
else
{
UUID sessionID = GetSessionID(folder.Owner);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.PurgeFolder(uri, folder, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: PurgeFolder for " + folder.Owner);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.PurgeFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.PurgeFolder(folder);
}
// public bool AddItem(InventoryItemBase item) inherited
// Uses AddItemPlain
protected override bool AddItemPlain(InventoryItemBase item)
public bool AddItem(InventoryItemBase item)
{
if (item == null)
return false;
string uri = string.Empty;
if (!IsForeignUser(item.Owner, out uri))
{
return m_GridService.AddItem(item);
}
else
{
UUID sessionID = GetSessionID(item.Owner);
uri = uri + "/" + item.Owner.ToString();
return m_HGService.AddItem(uri, item, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: AddItem " + item.ID);
string invURL = GetInventoryServiceURL(item.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.AddItem(item);
IInventoryService connector = GetConnector(invURL);
return connector.AddItem(item);
}
public override bool UpdateItem(InventoryItemBase item)
public bool UpdateItem(InventoryItemBase item)
{
if (item == null)
return false;
string uri = string.Empty;
if (!IsForeignUser(item.Owner, out uri))
return m_GridService.UpdateItem(item);
else
{
UUID sessionID = GetSessionID(item.Owner);
uri = uri + "/" + item.Owner.ToString();
return m_HGService.UpdateItem(uri, item, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: UpdateItem " + item.ID);
string invURL = GetInventoryServiceURL(item.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.UpdateItem(item);
IInventoryService connector = GetConnector(invURL);
return connector.UpdateItem(item);
}
public override bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
public bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
{
if (items == null)
return false;
if (items.Count == 0)
return true;
string uri = string.Empty;
if (!IsForeignUser(ownerID, out uri))
return m_GridService.MoveItems(ownerID, items);
else
{
UUID sessionID = GetSessionID(ownerID);
uri = uri + "/" + ownerID.ToString();
return m_HGService.MoveItems(uri, items, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: MoveItems for " + ownerID);
string invURL = GetInventoryServiceURL(ownerID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.MoveItems(ownerID, items);
IInventoryService connector = GetConnector(invURL);
return connector.MoveItems(ownerID, items);
}
public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
public bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
{
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Delete {0} items for user {1}", itemIDs.Count, ownerID);
@ -431,109 +458,98 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (itemIDs.Count == 0)
return true;
string uri = string.Empty;
if (!IsForeignUser(ownerID, out uri))
return m_GridService.DeleteItems(ownerID, itemIDs);
else
{
UUID sessionID = GetSessionID(ownerID);
uri = uri + "/" + ownerID.ToString();
return m_HGService.DeleteItems(uri, itemIDs, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: DeleteItems for " + ownerID);
string invURL = GetInventoryServiceURL(ownerID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.DeleteItems(ownerID, itemIDs);
IInventoryService connector = GetConnector(invURL);
return connector.DeleteItems(ownerID, itemIDs);
}
public override InventoryItemBase GetItem(InventoryItemBase item)
public InventoryItemBase GetItem(InventoryItemBase item)
{
if (item == null)
return null;
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetItem {0} for user {1}", item.ID, item.Owner);
string uri = string.Empty;
if (!IsForeignUser(item.Owner, out uri))
return m_GridService.GetItem(item);
else
{
UUID sessionID = GetSessionID(item.Owner);
uri = uri + "/" + item.Owner.ToString();
return m_HGService.QueryItem(uri, item, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: GetItem " + item.ID);
string invURL = GetInventoryServiceURL(item.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetItem(item);
IInventoryService connector = GetConnector(invURL);
return connector.GetItem(item);
}
public override InventoryFolderBase GetFolder(InventoryFolderBase folder)
public InventoryFolderBase GetFolder(InventoryFolderBase folder)
{
if (folder == null)
return null;
string uri = string.Empty;
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.GetFolder(folder);
else
{
UUID sessionID = GetSessionID(folder.Owner);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.QueryFolder(uri, folder, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolder " + folder.ID);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.GetFolder(folder);
}
public override bool HasInventoryForUser(UUID userID)
public bool HasInventoryForUser(UUID userID)
{
return false;
}
public override List<InventoryItemBase> GetActiveGestures(UUID userId)
public List<InventoryItemBase> GetActiveGestures(UUID userId)
{
return new List<InventoryItemBase>();
}
public override int GetAssetPermissions(UUID userID, UUID assetID)
public int GetAssetPermissions(UUID userID, UUID assetID)
{
string uri = string.Empty;
if (!IsForeignUser(userID, out uri))
return m_GridService.GetAssetPermissions(userID, assetID);
else
{
UUID sessionID = GetSessionID(userID);
uri = uri + "/" + userID.ToString();
return m_HGService.GetAssetPermissions(uri, assetID, sessionID);
}
m_log.Debug("[HG INVENTORY CONNECTOR]: GetAssetPermissions " + assetID);
string invURL = GetInventoryServiceURL(userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetAssetPermissions(userID, assetID);
IInventoryService connector = GetConnector(invURL);
return connector.GetAssetPermissions(userID, assetID);
}
#endregion
private UUID GetSessionID(UUID userID)
private IInventoryService GetConnector(string url)
{
ScenePresence sp = null;
if (m_Scene.TryGetScenePresence(userID, out sp))
IInventoryService connector = null;
lock (m_connectors)
{
return sp.ControllingClient.SessionId;
}
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: scene presence for {0} not found", userID);
return UUID.Zero;
}
private bool IsForeignUser(UUID userID, out string inventoryURL)
{
inventoryURL = string.Empty;
UserAccount account = null;
if (m_Scene.UserAccountService != null)
account = m_Scene.UserAccountService.GetUserAccount(m_Scene.RegionInfo.ScopeID, userID);
if (account == null) // foreign user
{
ScenePresence sp = null;
m_Scene.TryGetScenePresence(userID, out sp);
if (sp != null)
if (m_connectors.ContainsKey(url))
{
AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
if (aCircuit.ServiceURLs.ContainsKey("InventoryServerURI"))
{
inventoryURL = aCircuit.ServiceURLs["InventoryServerURI"].ToString();
inventoryURL = inventoryURL.Trim(new char[] { '/' });
return true;
}
connector = m_connectors[url];
}
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);
m_connectors.Add(url, connector);
}
}
return false;
return connector;
}
}

View File

@ -1,556 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using log4net;
using Nini.Config;
using System;
using System.Collections.Generic;
using System.Reflection;
using OpenSim.Framework;
using OpenSim.Server.Base;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
using OpenSim.Services.Connectors;
using OpenMetaverse;
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
{
public class HGInventoryBroker2 : ISharedRegionModule, IInventoryService
{
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
private static bool m_Enabled = false;
private static IInventoryService m_LocalGridInventoryService;
private Dictionary<string, IInventoryService> m_connectors = new Dictionary<string, IInventoryService>();
// A cache of userIDs --> ServiceURLs, for HGBroker only
protected Dictionary<UUID, string> m_InventoryURLs = new Dictionary<UUID,string>();
private List<Scene> m_Scenes = new List<Scene>();
public Type ReplaceableInterface
{
get { return null; }
}
public string Name
{
get { return "HGInventoryBroker2"; }
}
public void Initialise(IConfigSource source)
{
IConfig moduleConfig = source.Configs["Modules"];
if (moduleConfig != null)
{
string name = moduleConfig.GetString("InventoryServices", "");
if (name == Name)
{
IConfig inventoryConfig = source.Configs["InventoryService"];
if (inventoryConfig == null)
{
m_log.Error("[HG INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini");
return;
}
string localDll = inventoryConfig.GetString("LocalGridInventoryService",
String.Empty);
//string HGDll = inventoryConfig.GetString("HypergridInventoryService",
// String.Empty);
if (localDll == String.Empty)
{
m_log.Error("[HG INVENTORY CONNECTOR]: No LocalGridInventoryService named in section InventoryService");
//return;
throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's");
}
Object[] args = new Object[] { source };
m_LocalGridInventoryService =
ServerUtils.LoadPlugin<IInventoryService>(localDll,
args);
if (m_LocalGridInventoryService == null)
{
m_log.Error("[HG INVENTORY CONNECTOR]: Can't load local inventory service");
return;
}
m_Enabled = true;
m_log.InfoFormat("[HG INVENTORY CONNECTOR]: HG inventory broker enabled with inner connector of type {0}", m_LocalGridInventoryService.GetType());
}
}
}
public void PostInitialise()
{
}
public void Close()
{
}
public void AddRegion(Scene scene)
{
if (!m_Enabled)
return;
m_Scenes.Add(scene);
scene.RegisterModuleInterface<IInventoryService>(this);
scene.EventManager.OnClientClosed += OnClientClosed;
}
public void RemoveRegion(Scene scene)
{
if (!m_Enabled)
return;
m_Scenes.Remove(scene);
}
public void RegionLoaded(Scene scene)
{
if (!m_Enabled)
return;
m_log.InfoFormat("[HG INVENTORY CONNECTOR]: Enabled HG inventory for region {0}", scene.RegionInfo.RegionName);
}
#region URL Cache
void OnClientClosed(UUID clientID, Scene scene)
{
if (m_InventoryURLs.ContainsKey(clientID)) // if it's in cache
{
ScenePresence sp = null;
foreach (Scene s in m_Scenes)
{
s.TryGetScenePresence(clientID, out sp);
if ((sp != null) && !sp.IsChildAgent && (s != scene))
{
m_log.DebugFormat("[INVENTORY CACHE]: OnClientClosed in {0}, but user {1} still in sim. Keeping inventoryURL in cache",
scene.RegionInfo.RegionName, clientID);
return;
}
}
DropInventoryServiceURL(clientID);
}
}
/// <summary>
/// Gets the user's inventory URL from its serviceURLs, if the user is foreign,
/// and sticks it in the cache
/// </summary>
/// <param name="userID"></param>
private void CacheInventoryServiceURL(UUID userID)
{
if (m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, userID) == null)
{
// The user does not have a local account; let's cache its service URL
string inventoryURL = string.Empty;
ScenePresence sp = null;
foreach (Scene scene in m_Scenes)
{
scene.TryGetScenePresence(userID, out sp);
if (sp != null)
{
AgentCircuitData aCircuit = scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
if (aCircuit.ServiceURLs.ContainsKey("InventoryServerURI"))
{
inventoryURL = aCircuit.ServiceURLs["InventoryServerURI"].ToString();
if (inventoryURL != null && inventoryURL != string.Empty)
{
inventoryURL = inventoryURL.Trim(new char[] { '/' });
m_InventoryURLs.Add(userID, inventoryURL);
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Added {0} to the cache of inventory URLs", inventoryURL);
return;
}
}
}
}
}
// else put a null; it means that the methods should forward to local grid's inventory
m_InventoryURLs.Add(userID, null);
}
private void DropInventoryServiceURL(UUID userID)
{
lock (m_InventoryURLs)
if (m_InventoryURLs.ContainsKey(userID))
{
string url = m_InventoryURLs[userID];
m_InventoryURLs.Remove(userID);
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Removed {0} from the cache of inventory URLs", url);
}
}
public string GetInventoryServiceURL(UUID userID)
{
if (m_InventoryURLs.ContainsKey(userID))
return m_InventoryURLs[userID];
else
CacheInventoryServiceURL(userID);
return m_InventoryURLs[userID];
}
#endregion
#region IInventoryService
public bool CreateUserInventory(UUID userID)
{
return m_LocalGridInventoryService.CreateUserInventory(userID);
}
public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
{
return m_LocalGridInventoryService.GetInventorySkeleton(userId);
}
public InventoryCollection GetUserInventory(UUID userID)
{
return null;
}
public void GetUserInventory(UUID userID, InventoryReceiptCallback callback)
{
}
public InventoryFolderBase GetRootFolder(UUID userID)
{
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetRootFolder for {0}", userID);
string invURL = GetInventoryServiceURL(userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetRootFolder(userID);
IInventoryService connector = GetConnector(invURL);
return connector.GetRootFolder(userID);
}
public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
{
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetFolderForType {0} type {1}", userID, type);
string invURL = GetInventoryServiceURL(userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetFolderForType(userID, type);
IInventoryService connector = GetConnector(invURL);
return connector.GetFolderForType(userID, type);
}
public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
{
m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolderContent " + folderID);
string invURL = GetInventoryServiceURL(userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetFolderContent(userID, folderID);
IInventoryService connector = GetConnector(invURL);
return connector.GetFolderContent(userID, folderID);
}
public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{
m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolderItems " + folderID);
string invURL = GetInventoryServiceURL(userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetFolderItems(userID, folderID);
IInventoryService connector = GetConnector(invURL);
return connector.GetFolderItems(userID, folderID);
}
public bool AddFolder(InventoryFolderBase folder)
{
if (folder == null)
return false;
m_log.Debug("[HG INVENTORY CONNECTOR]: AddFolder " + folder.ID);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.AddFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.AddFolder(folder);
}
public bool UpdateFolder(InventoryFolderBase folder)
{
if (folder == null)
return false;
m_log.Debug("[HG INVENTORY CONNECTOR]: UpdateFolder " + folder.ID);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.UpdateFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.UpdateFolder(folder);
}
public bool DeleteFolders(UUID ownerID, List<UUID> folderIDs)
{
if (folderIDs == null)
return false;
if (folderIDs.Count == 0)
return false;
m_log.Debug("[HG INVENTORY CONNECTOR]: DeleteFolders for " + ownerID);
string invURL = GetInventoryServiceURL(ownerID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.DeleteFolders(ownerID, folderIDs);
IInventoryService connector = GetConnector(invURL);
return connector.DeleteFolders(ownerID, folderIDs);
}
public bool MoveFolder(InventoryFolderBase folder)
{
if (folder == null)
return false;
m_log.Debug("[HG INVENTORY CONNECTOR]: MoveFolder for " + folder.Owner);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.MoveFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.MoveFolder(folder);
}
public bool PurgeFolder(InventoryFolderBase folder)
{
if (folder == null)
return false;
m_log.Debug("[HG INVENTORY CONNECTOR]: PurgeFolder for " + folder.Owner);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.PurgeFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.PurgeFolder(folder);
}
public bool AddItem(InventoryItemBase item)
{
if (item == null)
return false;
m_log.Debug("[HG INVENTORY CONNECTOR]: AddItem " + item.ID);
string invURL = GetInventoryServiceURL(item.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.AddItem(item);
IInventoryService connector = GetConnector(invURL);
return connector.AddItem(item);
}
public bool UpdateItem(InventoryItemBase item)
{
if (item == null)
return false;
m_log.Debug("[HG INVENTORY CONNECTOR]: UpdateItem " + item.ID);
string invURL = GetInventoryServiceURL(item.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.UpdateItem(item);
IInventoryService connector = GetConnector(invURL);
return connector.UpdateItem(item);
}
public bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
{
if (items == null)
return false;
if (items.Count == 0)
return true;
m_log.Debug("[HG INVENTORY CONNECTOR]: MoveItems for " + ownerID);
string invURL = GetInventoryServiceURL(ownerID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.MoveItems(ownerID, items);
IInventoryService connector = GetConnector(invURL);
return connector.MoveItems(ownerID, items);
}
public bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
{
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Delete {0} items for user {1}", itemIDs.Count, ownerID);
if (itemIDs == null)
return false;
if (itemIDs.Count == 0)
return true;
m_log.Debug("[HG INVENTORY CONNECTOR]: DeleteItems for " + ownerID);
string invURL = GetInventoryServiceURL(ownerID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.DeleteItems(ownerID, itemIDs);
IInventoryService connector = GetConnector(invURL);
return connector.DeleteItems(ownerID, itemIDs);
}
public InventoryItemBase GetItem(InventoryItemBase item)
{
if (item == null)
return null;
m_log.Debug("[HG INVENTORY CONNECTOR]: GetItem " + item.ID);
string invURL = GetInventoryServiceURL(item.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetItem(item);
IInventoryService connector = GetConnector(invURL);
return connector.GetItem(item);
}
public InventoryFolderBase GetFolder(InventoryFolderBase folder)
{
if (folder == null)
return null;
m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolder " + folder.ID);
string invURL = GetInventoryServiceURL(folder.Owner);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetFolder(folder);
IInventoryService connector = GetConnector(invURL);
return connector.GetFolder(folder);
}
public bool HasInventoryForUser(UUID userID)
{
return false;
}
public List<InventoryItemBase> GetActiveGestures(UUID userId)
{
return new List<InventoryItemBase>();
}
public int GetAssetPermissions(UUID userID, UUID assetID)
{
m_log.Debug("[HG INVENTORY CONNECTOR]: GetAssetPermissions " + assetID);
string invURL = GetInventoryServiceURL(userID);
if (invURL == null) // not there, forward to local inventory connector to resolve
return m_LocalGridInventoryService.GetAssetPermissions(userID, assetID);
IInventoryService connector = GetConnector(invURL);
return connector.GetAssetPermissions(userID, assetID);
}
#endregion
private IInventoryService GetConnector(string url)
{
IInventoryService connector = null;
lock (m_connectors)
{
if (m_connectors.ContainsKey(url))
{
connector = m_connectors[url];
}
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);
m_connectors.Add(url, connector);
}
}
return connector;
}
}
}

View File

@ -41,7 +41,7 @@ using OpenMetaverse;
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
{
public class LocalInventoryServicesConnector : BaseInventoryConnector, ISharedRegionModule, IInventoryService
public class LocalInventoryServicesConnector : ISharedRegionModule, IInventoryService
{
private static readonly ILog m_log =
LogManager.GetLogger(
@ -50,7 +50,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
private IInventoryService m_InventoryService;
private bool m_Enabled = false;
private bool m_Initialized = false;
public Type ReplaceableInterface
{
@ -93,23 +92,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (m_InventoryService == null)
{
m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: Can't load inventory service");
//return;
throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's");
}
//List<IInventoryDataPlugin> plugins
// = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(
// configSettings.StandaloneInventoryPlugin,
// configSettings.StandaloneInventorySource);
//foreach (IInventoryDataPlugin plugin in plugins)
//{
// // Using the OSP wrapper plugin for database plugins should be made configurable at some point
// m_InventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this));
//}
Init(source);
m_Enabled = true;
m_log.Info("[LOCAL INVENTORY SERVICES CONNECTOR]: Local inventory connector enabled");
}
@ -129,98 +114,59 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (!m_Enabled)
return;
if (!m_Initialized)
{
m_Initialized = true;
}
// m_log.DebugFormat(
// "[LOCAL INVENTORY SERVICES CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName);
scene.RegisterModuleInterface<IInventoryService>(this);
m_cache.AddRegion(scene);
}
public void RemoveRegion(Scene scene)
{
if (!m_Enabled)
return;
m_cache.RemoveRegion(scene);
}
public void RegionLoaded(Scene scene)
{
if (!m_Enabled)
return;
m_log.InfoFormat(
"[LOCAL INVENTORY SERVICES CONNECTOR]: Enabled local inventory for region {0}", scene.RegionInfo.RegionName);
}
#region IInventoryService
public override bool CreateUserInventory(UUID user)
public bool CreateUserInventory(UUID user)
{
return m_InventoryService.CreateUserInventory(user);
}
public override List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
{
return m_InventoryService.GetInventorySkeleton(userId);
}
public override InventoryCollection GetUserInventory(UUID id)
public InventoryCollection GetUserInventory(UUID id)
{
return m_InventoryService.GetUserInventory(id);
}
public override void GetUserInventory(UUID userID, InventoryReceiptCallback callback)
public void GetUserInventory(UUID userID, InventoryReceiptCallback callback)
{
m_InventoryService.GetUserInventory(userID, callback);
}
// Inherited. See base
//public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
//{
// return m_InventoryService.GetFolderForType(userID, type);
//}
public override Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID)
public InventoryFolderBase GetRootFolder(UUID userID)
{
InventoryFolderBase root = m_InventoryService.GetRootFolder(userID);
if (root != null)
{
InventoryCollection content = GetFolderContent(userID, root.ID);
if (content != null)
{
Dictionary<AssetType, InventoryFolderBase> folders = new Dictionary<AssetType, InventoryFolderBase>();
foreach (InventoryFolderBase folder in content.Folders)
{
if ((folder.Type != (short)AssetType.Folder) && (folder.Type != (short)AssetType.Unknown))
{
//m_log.InfoFormat("[INVENTORY CONNECTOR]: folder type {0} ", folder.Type);
folders[(AssetType)folder.Type] = folder;
}
}
// Put the root folder there, as type Folder
folders[AssetType.Folder] = root;
//m_log.InfoFormat("[INVENTORY CONNECTOR]: root folder is type {0} ", root.Type);
return folders;
}
}
m_log.WarnFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: System folders for {0} not found", userID);
return new Dictionary<AssetType, InventoryFolderBase>();
return m_InventoryService.GetRootFolder(userID);
}
public override InventoryCollection GetFolderContent(UUID userID, UUID folderID)
public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
{
return m_InventoryService.GetFolderForType(userID, type);
}
public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
{
return m_InventoryService.GetFolderContent(userID, folderID);
}
public override List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{
return m_InventoryService.GetFolderItems(userID, folderID);
}
@ -230,7 +176,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary>
/// <param name="folder"></param>
/// <returns>true if the folder was successfully added</returns>
public override bool AddFolder(InventoryFolderBase folder)
public bool AddFolder(InventoryFolderBase folder)
{
return m_InventoryService.AddFolder(folder);
}
@ -240,7 +186,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary>
/// <param name="folder"></param>
/// <returns>true if the folder was successfully updated</returns>
public override bool UpdateFolder(InventoryFolderBase folder)
public bool UpdateFolder(InventoryFolderBase folder)
{
return m_InventoryService.UpdateFolder(folder);
}
@ -250,12 +196,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary>
/// <param name="folder">A folder containing the details of the new location</param>
/// <returns>true if the folder was successfully moved</returns>
public override bool MoveFolder(InventoryFolderBase folder)
public bool MoveFolder(InventoryFolderBase folder)
{
return m_InventoryService.MoveFolder(folder);
}
public override bool DeleteFolders(UUID ownerID, List<UUID> folderIDs)
public bool DeleteFolders(UUID ownerID, List<UUID> folderIDs)
{
return m_InventoryService.DeleteFolders(ownerID, folderIDs);
}
@ -265,18 +211,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary>
/// <param name="folder"></param>
/// <returns>true if the folder was successfully purged</returns>
public override bool PurgeFolder(InventoryFolderBase folder)
public bool PurgeFolder(InventoryFolderBase folder)
{
return m_InventoryService.PurgeFolder(folder);
}
/// <summary>
/// Add a new item to the user's inventory, plain
/// Called by base class AddItem
/// Add a new item to the user's inventory
/// </summary>
/// <param name="item"></param>
/// <returns>true if the item was successfully added</returns>
protected override bool AddItemPlain(InventoryItemBase item)
public bool AddItem(InventoryItemBase item)
{
return m_InventoryService.AddItem(item);
}
@ -286,13 +231,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary>
/// <param name="item"></param>
/// <returns>true if the item was successfully updated</returns>
public override bool UpdateItem(InventoryItemBase item)
public bool UpdateItem(InventoryItemBase item)
{
return m_InventoryService.UpdateItem(item);
}
public override bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
public bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
{
return m_InventoryService.MoveItems(ownerID, items);
}
@ -302,12 +247,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary>
/// <param name="item"></param>
/// <returns>true if the item was successfully deleted</returns>
public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
public bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
{
return m_InventoryService.DeleteItems(ownerID, itemIDs);
}
public override InventoryItemBase GetItem(InventoryItemBase item)
public InventoryItemBase GetItem(InventoryItemBase item)
{
// m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID);
@ -322,7 +267,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return item;
}
public override InventoryFolderBase GetFolder(InventoryFolderBase folder)
public InventoryFolderBase GetFolder(InventoryFolderBase folder)
{
return m_InventoryService.GetFolder(folder);
}
@ -332,17 +277,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary>
/// <param name="userID"></param>
/// <returns></returns>
public override bool HasInventoryForUser(UUID userID)
public bool HasInventoryForUser(UUID userID)
{
return m_InventoryService.HasInventoryForUser(userID);
}
public override List<InventoryItemBase> GetActiveGestures(UUID userId)
public List<InventoryItemBase> GetActiveGestures(UUID userId)
{
return m_InventoryService.GetActiveGestures(userId);
}
public override int GetAssetPermissions(UUID userID, UUID assetID)
public int GetAssetPermissions(UUID userID, UUID assetID)
{
return m_InventoryService.GetAssetPermissions(userID, assetID);
}

View File

@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
data.Y = 0;
blocks.Add(data);
remoteClient.SendMapBlock(blocks, 0);
remoteClient.SendMapBlock(blocks, 2);
}
private Scene GetClientScene(IClientAPI client)

View File

@ -4556,6 +4556,7 @@ namespace OpenSim.Region.Framework.Scenes
foreach (SceneObjectPart child in partList)
{
child.Inventory.ChangeInventoryOwner(remoteClient.AgentId);
child.TriggerScriptChangedEvent(Changed.OWNER);
child.ApplyNextOwnerPermissions();
}
}
@ -4565,6 +4566,8 @@ namespace OpenSim.Region.Framework.Scenes
group.HasGroupChanged = true;
part.GetProperties(remoteClient);
part.TriggerScriptChangedEvent(Changed.OWNER);
group.ResumeScripts();
part.ScheduleFullUpdate();
break;

View File

@ -1082,12 +1082,11 @@ namespace OpenSim.Region.Framework.Scenes
item.CurrentPermissions &= ~(uint)PermissionMask.Modify;
item.CurrentPermissions |= 8;
}
item.OwnerChanged = true;
item.CurrentPermissions &= item.NextPermissions;
item.BasePermissions &= item.NextPermissions;
item.EveryonePermissions &= item.NextPermissions;
}
m_part.TriggerScriptChangedEvent(Changed.OWNER);
}
public void ApplyGodPermissions(uint perms)
@ -1180,7 +1179,10 @@ namespace OpenSim.Region.Framework.Scenes
foreach (IScriptModule engine in engines)
{
if (engine != null)
{
engine.PostScriptEvent(item.ItemID, "changed", new Object[] { Changed.OWNER });
engine.ResumeScript(item.ItemID);
}
}
}
}

View File

@ -549,5 +549,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int STATS_ACTIVE_SCRIPTS = 19;
public const int STATS_SCRIPT_LPS = 20;
public const string URL_REQUEST_GRANTED = "URL_REQUEST_GRANTED";
public const string URL_REQUEST_DENIED = "URL_REQUEST_DENIED";
}
}

View File

@ -11,7 +11,7 @@
;;
[Startup]
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:InventoryServiceInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8003/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:HGInventoryServiceInConnector,8002/OpenSim.Server.Handlers.dll:AssetServiceConnector"
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryServiceInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8003/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:AssetServiceConnector"
; * This is common for all services, it's the network setup for the entire
; * server instance, if none if specified above
@ -44,8 +44,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; * the function of the legacy inventory server
; *
[InventoryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService"
SessionAuthentication = "false"
LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
; * This is the new style grid service.
; * "Realm" is the table that is used for user lookup.
@ -92,7 +91,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
[PresenceService]
; for the server connector
@ -116,7 +115,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; for the service
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"

View File

@ -11,7 +11,7 @@
; *
[Startup]
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:InventoryServiceInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector"
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector"
; * This is common for all services, it's the network setup for the entire
; * server instance, if none if specified above
@ -45,8 +45,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; * the function of the legacy inventory server
; *
[InventoryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService"
SessionAuthentication = "false"
LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
; * This is the new style grid service.
; * "Realm" is the table that is used for user lookup.
@ -94,7 +93,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
[PresenceService]
; for the server connector
@ -118,7 +117,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; for the service
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"

View File

@ -9,7 +9,7 @@
[Modules]
AssetServices = "RemoteAssetServicesConnector"
InventoryServices = "RemoteInventoryServicesConnector"
InventoryServices = "RemoteXInventoryServicesConnector"
GridServices = "RemoteGridServicesConnector"
AvatarServices = "RemoteAvatarServicesConnector"
NeighbourServices = "RemoteNeighbourServicesConnector"

View File

@ -30,8 +30,7 @@
HypergridAssetService = "OpenSim.Services.Connectors.dll:HGAssetServiceConnector"
[InventoryService]
LocalGridInventoryService = "OpenSim.Region.CoreModules.dll:RemoteInventoryServicesConnector"
HypergridInventoryService = "OpenSim.Services.Connectors.dll:HGInventoryServiceConnector"
LocalGridInventoryService = "OpenSim.Region.CoreModules.dll:RemoteXInventoryServicesConnector"
[GridService]
; RemoteGridServicesConnector instantiates a LocalGridServicesConnector,

View File

@ -24,7 +24,7 @@
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
[InventoryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService"
LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
[LibraryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
@ -56,7 +56,7 @@
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
[GridUserService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService"
@ -71,7 +71,7 @@
LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService"
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"

View File

@ -33,11 +33,10 @@
HypergridAssetService = "OpenSim.Services.Connectors.dll:HGAssetServiceConnector"
[InventoryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService"
LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
; For HGInventoryBroker
LocalGridInventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
HypergridInventoryService = "OpenSim.Services.Connectors.dll:HGInventoryServiceConnector"
LocalGridInventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
[AvatarService]
LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService"
@ -74,7 +73,7 @@
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
[FriendsService]
LocalServiceModule = "OpenSim.Services.FriendsService.dll"
@ -88,7 +87,7 @@
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"

View File

@ -3,6 +3,11 @@
[DatabaseService]
StorageProvider = "OpenSim.Data.SQLite.dll"
[InventoryService]
;ConnectionString = "URI=file:inventory.db,version=3"
; if you have a legacy inventory store use the connection string below
ConnectionString = "URI=file:inventory.db,version=3,UseUTF16Encoding=True"
[AvatarService]
ConnectionString = "URI=file:avatars.db,version=3"
@ -14,3 +19,4 @@
[FriendsService]
ConnectionString = "URI=file:friends.db,version=3"