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" /> <property name="distbindir" value="distbin" />
<target name="distbin"> <target name="distbin">
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/> <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}"/> <delete dir="${distbindir}"/>
<!-- <copy file="*" todir="${distbindir}"/> -->
<copy todir="${distbindir}"> <copy todir="${distbindir}">
<fileset> <fileset>
<include name="**"/> <include name="**"/>

View File

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

View File

@ -1,4 +1,4 @@
Copyright (c) Contributors, http://opensimulator.org/ Copyright (c) Contributors, http://opensimulator.org/
See CONTRIBUTORS.TXT for a full list of copyright holders. See CONTRIBUTORS.TXT for a full list of copyright holders.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

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

View File

@ -59,7 +59,7 @@ namespace OpenSim.Data.SQLite
if (!m_initialized) if (!m_initialized)
{ {
m_Connection = new SqliteConnection(connectionString); 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(); m_Connection.Open();
if (storeName != String.Empty) if (storeName != String.Empty)

View File

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

View File

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

View File

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

View File

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

View File

@ -41,20 +41,21 @@ using OpenMetaverse;
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
{ {
public class HGInventoryBroker : BaseInventoryConnector, INonSharedRegionModule, IInventoryService public class HGInventoryBroker : ISharedRegionModule, IInventoryService
{ {
private static readonly ILog m_log = private static readonly ILog m_log =
LogManager.GetLogger( LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); MethodBase.GetCurrentMethod().DeclaringType);
private static bool m_Initialized = false;
private static bool m_Enabled = false; private static bool m_Enabled = false;
private static IInventoryService m_GridService; private static IInventoryService m_LocalGridInventoryService;
private static ISessionAuthInventoryService m_HGService; private Dictionary<string, IInventoryService> m_connectors = new Dictionary<string, IInventoryService>();
private Scene m_Scene; // A cache of userIDs --> ServiceURLs, for HGBroker only
private IUserAccountService m_UserAccountService; protected Dictionary<UUID, string> m_InventoryURLs = new Dictionary<UUID,string>();
private List<Scene> m_Scenes = new List<Scene>();
public Type ReplaceableInterface public Type ReplaceableInterface
{ {
@ -68,67 +69,45 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public void Initialise(IConfigSource source) public void Initialise(IConfigSource source)
{ {
if (!m_Initialized) IConfig moduleConfig = source.Configs["Modules"];
if (moduleConfig != null)
{ {
IConfig moduleConfig = source.Configs["Modules"]; string name = moduleConfig.GetString("InventoryServices", "");
if (moduleConfig != null) if (name == Name)
{ {
string name = moduleConfig.GetString("InventoryServices", ""); IConfig inventoryConfig = source.Configs["InventoryService"];
if (name == Name) if (inventoryConfig == null)
{ {
IConfig inventoryConfig = source.Configs["InventoryService"]; m_log.Error("[HG INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini");
if (inventoryConfig == null) return;
{
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");
} }
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,19 +124,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (!m_Enabled) if (!m_Enabled)
return; return;
m_Scene = scene; m_Scenes.Add(scene);
m_UserAccountService = m_Scene.UserAccountService;
scene.RegisterModuleInterface<IInventoryService>(this); scene.RegisterModuleInterface<IInventoryService>(this);
m_cache.AddRegion(scene);
scene.EventManager.OnClientClosed += OnClientClosed;
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
{ {
if (!m_Enabled) if (!m_Enabled)
return; return;
m_cache.RemoveRegion(scene); m_Scenes.Remove(scene);
} }
public void RegionLoaded(Scene 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 #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; return null;
} }
public override void GetUserInventory(UUID userID, InventoryReceiptCallback callback) public void GetUserInventory(UUID userID, InventoryReceiptCallback callback)
{ {
} }
// Inherited. See base public InventoryFolderBase GetRootFolder(UUID userID)
//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)
{ {
string uri = string.Empty; m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetRootFolder for {0}", userID);
if (!IsForeignUser(userID, out uri))
return m_GridService.GetFolderContent(userID, folderID); string invURL = GetInventoryServiceURL(userID);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(userID); return m_LocalGridInventoryService.GetRootFolder(userID);
uri = uri + "/" + userID.ToString();
return m_HGService.GetFolderContent(uri, folderID, sessionID); 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; m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetFolderForType {0} type {1}", userID, type);
if (!IsForeignUser(userID, out uri))
{ string invURL = GetInventoryServiceURL(userID);
// This is not pretty, but it will have to do for now
if (m_GridService is BaseInventoryConnector) if (invURL == null) // not there, forward to local inventory connector to resolve
{ return m_LocalGridInventoryService.GetFolderForType(userID, type);
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetSystemsFolders redirected to RemoteInventoryServiceConnector module");
return ((BaseInventoryConnector)m_GridService).GetSystemFolders(userID); IInventoryService connector = GetConnector(invURL);
}
else return connector.GetFolderForType(userID, type);
{
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);
}
} }
private Dictionary<AssetType, InventoryFolderBase> GetSystemFoldersLocal(UUID userID) public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
{ {
InventoryFolderBase root = m_GridService.GetRootFolder(userID); m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolderContent " + folderID);
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);
} 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; m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolderItems " + folderID);
if (!IsForeignUser(userID, out uri))
return m_GridService.GetFolderItems(userID, folderID); string invURL = GetInventoryServiceURL(userID);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(userID); return m_LocalGridInventoryService.GetFolderItems(userID, folderID);
uri = uri + "/" + userID.ToString();
return m_HGService.GetFolderItems(uri, folderID, sessionID); IInventoryService connector = GetConnector(invURL);
}
return connector.GetFolderItems(userID, folderID);
} }
public override bool AddFolder(InventoryFolderBase folder) public bool AddFolder(InventoryFolderBase folder)
{ {
if (folder == null) if (folder == null)
return false; return false;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: AddFolder " + folder.ID);
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.AddFolder(folder); string invURL = GetInventoryServiceURL(folder.Owner);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(folder.Owner); return m_LocalGridInventoryService.AddFolder(folder);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.AddFolder(uri, folder, sessionID); IInventoryService connector = GetConnector(invURL);
}
return connector.AddFolder(folder);
} }
public override bool UpdateFolder(InventoryFolderBase folder) public bool UpdateFolder(InventoryFolderBase folder)
{ {
if (folder == null) if (folder == null)
return false; return false;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: UpdateFolder " + folder.ID);
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.UpdateFolder(folder); string invURL = GetInventoryServiceURL(folder.Owner);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(folder.Owner); return m_LocalGridInventoryService.UpdateFolder(folder);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.UpdateFolder(uri, folder, sessionID); 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) if (folderIDs == null)
return false; return false;
if (folderIDs.Count == 0) if (folderIDs.Count == 0)
return false; return false;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: DeleteFolders for " + ownerID);
if (!IsForeignUser(ownerID, out uri))
return m_GridService.DeleteFolders(ownerID, folderIDs); string invURL = GetInventoryServiceURL(ownerID);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(ownerID); return m_LocalGridInventoryService.DeleteFolders(ownerID, folderIDs);
uri = uri + "/" + ownerID.ToString();
return m_HGService.DeleteFolders(uri, folderIDs, sessionID); IInventoryService connector = GetConnector(invURL);
}
return connector.DeleteFolders(ownerID, folderIDs);
} }
public override bool MoveFolder(InventoryFolderBase folder) public bool MoveFolder(InventoryFolderBase folder)
{ {
if (folder == null) if (folder == null)
return false; return false;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: MoveFolder for " + folder.Owner);
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.MoveFolder(folder); string invURL = GetInventoryServiceURL(folder.Owner);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(folder.Owner); return m_LocalGridInventoryService.MoveFolder(folder);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.MoveFolder(uri, folder, sessionID); IInventoryService connector = GetConnector(invURL);
}
return connector.MoveFolder(folder);
} }
public override bool PurgeFolder(InventoryFolderBase folder) public bool PurgeFolder(InventoryFolderBase folder)
{ {
if (folder == null) if (folder == null)
return false; return false;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: PurgeFolder for " + folder.Owner);
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.PurgeFolder(folder); string invURL = GetInventoryServiceURL(folder.Owner);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(folder.Owner); return m_LocalGridInventoryService.PurgeFolder(folder);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.PurgeFolder(uri, folder, sessionID); IInventoryService connector = GetConnector(invURL);
}
return connector.PurgeFolder(folder);
} }
// public bool AddItem(InventoryItemBase item) inherited public bool AddItem(InventoryItemBase item)
// Uses AddItemPlain
protected override bool AddItemPlain(InventoryItemBase item)
{ {
if (item == null) if (item == null)
return false; return false;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: AddItem " + item.ID);
if (!IsForeignUser(item.Owner, out uri))
{ string invURL = GetInventoryServiceURL(item.Owner);
return m_GridService.AddItem(item);
} if (invURL == null) // not there, forward to local inventory connector to resolve
else return m_LocalGridInventoryService.AddItem(item);
{
UUID sessionID = GetSessionID(item.Owner); IInventoryService connector = GetConnector(invURL);
uri = uri + "/" + item.Owner.ToString();
return m_HGService.AddItem(uri, item, sessionID); return connector.AddItem(item);
}
} }
public override bool UpdateItem(InventoryItemBase item) public bool UpdateItem(InventoryItemBase item)
{ {
if (item == null) if (item == null)
return false; return false;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: UpdateItem " + item.ID);
if (!IsForeignUser(item.Owner, out uri))
return m_GridService.UpdateItem(item); string invURL = GetInventoryServiceURL(item.Owner);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(item.Owner); return m_LocalGridInventoryService.UpdateItem(item);
uri = uri + "/" + item.Owner.ToString();
return m_HGService.UpdateItem(uri, item, sessionID); 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) if (items == null)
return false; return false;
if (items.Count == 0) if (items.Count == 0)
return true; return true;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: MoveItems for " + ownerID);
if (!IsForeignUser(ownerID, out uri))
return m_GridService.MoveItems(ownerID, items); string invURL = GetInventoryServiceURL(ownerID);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(ownerID); return m_LocalGridInventoryService.MoveItems(ownerID, items);
uri = uri + "/" + ownerID.ToString();
return m_HGService.MoveItems(uri, items, sessionID); 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); 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) if (itemIDs.Count == 0)
return true; return true;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: DeleteItems for " + ownerID);
if (!IsForeignUser(ownerID, out uri))
return m_GridService.DeleteItems(ownerID, itemIDs); string invURL = GetInventoryServiceURL(ownerID);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(ownerID); return m_LocalGridInventoryService.DeleteItems(ownerID, itemIDs);
uri = uri + "/" + ownerID.ToString();
return m_HGService.DeleteItems(uri, itemIDs, sessionID); IInventoryService connector = GetConnector(invURL);
}
return connector.DeleteItems(ownerID, itemIDs);
} }
public override InventoryItemBase GetItem(InventoryItemBase item) public InventoryItemBase GetItem(InventoryItemBase item)
{ {
if (item == null) if (item == null)
return null; return null;
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetItem {0} for user {1}", item.ID, item.Owner); m_log.Debug("[HG INVENTORY CONNECTOR]: GetItem " + item.ID);
string uri = string.Empty;
if (!IsForeignUser(item.Owner, out uri)) string invURL = GetInventoryServiceURL(item.Owner);
return m_GridService.GetItem(item);
else if (invURL == null) // not there, forward to local inventory connector to resolve
{ return m_LocalGridInventoryService.GetItem(item);
UUID sessionID = GetSessionID(item.Owner);
uri = uri + "/" + item.Owner.ToString(); IInventoryService connector = GetConnector(invURL);
return m_HGService.QueryItem(uri, item, sessionID);
} return connector.GetItem(item);
} }
public override InventoryFolderBase GetFolder(InventoryFolderBase folder) public InventoryFolderBase GetFolder(InventoryFolderBase folder)
{ {
if (folder == null) if (folder == null)
return null; return null;
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolder " + folder.ID);
if (!IsForeignUser(folder.Owner, out uri))
return m_GridService.GetFolder(folder); string invURL = GetInventoryServiceURL(folder.Owner);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(folder.Owner); return m_LocalGridInventoryService.GetFolder(folder);
uri = uri + "/" + folder.Owner.ToString();
return m_HGService.QueryFolder(uri, folder, sessionID); IInventoryService connector = GetConnector(invURL);
}
return connector.GetFolder(folder);
} }
public override bool HasInventoryForUser(UUID userID) public bool HasInventoryForUser(UUID userID)
{ {
return false; return false;
} }
public override List<InventoryItemBase> GetActiveGestures(UUID userId) public List<InventoryItemBase> GetActiveGestures(UUID userId)
{ {
return new List<InventoryItemBase>(); return new List<InventoryItemBase>();
} }
public override int GetAssetPermissions(UUID userID, UUID assetID) public int GetAssetPermissions(UUID userID, UUID assetID)
{ {
string uri = string.Empty; m_log.Debug("[HG INVENTORY CONNECTOR]: GetAssetPermissions " + assetID);
if (!IsForeignUser(userID, out uri))
return m_GridService.GetAssetPermissions(userID, assetID); string invURL = GetInventoryServiceURL(userID);
else
{ if (invURL == null) // not there, forward to local inventory connector to resolve
UUID sessionID = GetSessionID(userID); return m_LocalGridInventoryService.GetAssetPermissions(userID, assetID);
uri = uri + "/" + userID.ToString();
return m_HGService.GetAssetPermissions(uri, assetID, sessionID); IInventoryService connector = GetConnector(invURL);
}
return connector.GetAssetPermissions(userID, assetID);
} }
#endregion #endregion
private UUID GetSessionID(UUID userID) private IInventoryService GetConnector(string url)
{ {
ScenePresence sp = null; IInventoryService connector = null;
if (m_Scene.TryGetScenePresence(userID, out sp)) lock (m_connectors)
{ {
return sp.ControllingClient.SessionId; if (m_connectors.ContainsKey(url))
}
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)
{ {
AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); connector = m_connectors[url];
if (aCircuit.ServiceURLs.ContainsKey("InventoryServerURI")) }
{ else
inventoryURL = aCircuit.ServiceURLs["InventoryServerURI"].ToString(); {
inventoryURL = inventoryURL.Trim(new char[] { '/' }); // We're instantiating this class explicitly, but this won't
return true; // 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 namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
{ {
public class LocalInventoryServicesConnector : BaseInventoryConnector, ISharedRegionModule, IInventoryService public class LocalInventoryServicesConnector : ISharedRegionModule, IInventoryService
{ {
private static readonly ILog m_log = private static readonly ILog m_log =
LogManager.GetLogger( LogManager.GetLogger(
@ -50,7 +50,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
private IInventoryService m_InventoryService; private IInventoryService m_InventoryService;
private bool m_Enabled = false; private bool m_Enabled = false;
private bool m_Initialized = false;
public Type ReplaceableInterface public Type ReplaceableInterface
{ {
@ -93,23 +92,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (m_InventoryService == null) if (m_InventoryService == null)
{ {
m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: Can't load inventory service"); 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"); 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_Enabled = true;
m_log.Info("[LOCAL INVENTORY SERVICES CONNECTOR]: Local inventory connector enabled"); m_log.Info("[LOCAL INVENTORY SERVICES CONNECTOR]: Local inventory connector enabled");
} }
@ -128,99 +113,60 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
{ {
if (!m_Enabled) if (!m_Enabled)
return; 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); scene.RegisterModuleInterface<IInventoryService>(this);
m_cache.AddRegion(scene);
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
{ {
if (!m_Enabled) if (!m_Enabled)
return; return;
m_cache.RemoveRegion(scene);
} }
public void RegionLoaded(Scene scene) public void RegionLoaded(Scene scene)
{ {
if (!m_Enabled) if (!m_Enabled)
return; return;
m_log.InfoFormat(
"[LOCAL INVENTORY SERVICES CONNECTOR]: Enabled local inventory for region {0}", scene.RegionInfo.RegionName);
} }
#region IInventoryService #region IInventoryService
public override bool CreateUserInventory(UUID user) public bool CreateUserInventory(UUID user)
{ {
return m_InventoryService.CreateUserInventory(user); return m_InventoryService.CreateUserInventory(user);
} }
public override List<InventoryFolderBase> GetInventorySkeleton(UUID userId) public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
{ {
return m_InventoryService.GetInventorySkeleton(userId); return m_InventoryService.GetInventorySkeleton(userId);
} }
public override InventoryCollection GetUserInventory(UUID id) public InventoryCollection GetUserInventory(UUID id)
{ {
return m_InventoryService.GetUserInventory(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); m_InventoryService.GetUserInventory(userID, callback);
} }
// Inherited. See base public InventoryFolderBase GetRootFolder(UUID userID)
//public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
//{
// return m_InventoryService.GetFolderForType(userID, type);
//}
public override Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID)
{ {
InventoryFolderBase root = m_InventoryService.GetRootFolder(userID); return 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>();
} }
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); return m_InventoryService.GetFolderContent(userID, folderID);
} }
public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
public override List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{ {
return m_InventoryService.GetFolderItems(userID, folderID); return m_InventoryService.GetFolderItems(userID, folderID);
} }
@ -230,7 +176,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary> /// </summary>
/// <param name="folder"></param> /// <param name="folder"></param>
/// <returns>true if the folder was successfully added</returns> /// <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); return m_InventoryService.AddFolder(folder);
} }
@ -240,7 +186,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary> /// </summary>
/// <param name="folder"></param> /// <param name="folder"></param>
/// <returns>true if the folder was successfully updated</returns> /// <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); return m_InventoryService.UpdateFolder(folder);
} }
@ -250,12 +196,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary> /// </summary>
/// <param name="folder">A folder containing the details of the new location</param> /// <param name="folder">A folder containing the details of the new location</param>
/// <returns>true if the folder was successfully moved</returns> /// <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); 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); return m_InventoryService.DeleteFolders(ownerID, folderIDs);
} }
@ -265,18 +211,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary> /// </summary>
/// <param name="folder"></param> /// <param name="folder"></param>
/// <returns>true if the folder was successfully purged</returns> /// <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); return m_InventoryService.PurgeFolder(folder);
} }
/// <summary> /// <summary>
/// Add a new item to the user's inventory, plain /// Add a new item to the user's inventory
/// Called by base class AddItem
/// </summary> /// </summary>
/// <param name="item"></param> /// <param name="item"></param>
/// <returns>true if the item was successfully added</returns> /// <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); return m_InventoryService.AddItem(item);
} }
@ -286,13 +231,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary> /// </summary>
/// <param name="item"></param> /// <param name="item"></param>
/// <returns>true if the item was successfully updated</returns> /// <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); 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); return m_InventoryService.MoveItems(ownerID, items);
} }
@ -302,12 +247,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary> /// </summary>
/// <param name="item"></param> /// <param name="item"></param>
/// <returns>true if the item was successfully deleted</returns> /// <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); 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); // 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; return item;
} }
public override InventoryFolderBase GetFolder(InventoryFolderBase folder) public InventoryFolderBase GetFolder(InventoryFolderBase folder)
{ {
return m_InventoryService.GetFolder(folder); return m_InventoryService.GetFolder(folder);
} }
@ -332,17 +277,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// </summary> /// </summary>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns></returns> /// <returns></returns>
public override bool HasInventoryForUser(UUID userID) public bool HasInventoryForUser(UUID userID)
{ {
return m_InventoryService.HasInventoryForUser(userID); return m_InventoryService.HasInventoryForUser(userID);
} }
public override List<InventoryItemBase> GetActiveGestures(UUID userId) public List<InventoryItemBase> GetActiveGestures(UUID userId)
{ {
return m_InventoryService.GetActiveGestures(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); return m_InventoryService.GetAssetPermissions(userID, assetID);
} }

View File

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

View File

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

View File

@ -1082,12 +1082,11 @@ namespace OpenSim.Region.Framework.Scenes
item.CurrentPermissions &= ~(uint)PermissionMask.Modify; item.CurrentPermissions &= ~(uint)PermissionMask.Modify;
item.CurrentPermissions |= 8; item.CurrentPermissions |= 8;
} }
item.OwnerChanged = true;
item.CurrentPermissions &= item.NextPermissions; item.CurrentPermissions &= item.NextPermissions;
item.BasePermissions &= item.NextPermissions; item.BasePermissions &= item.NextPermissions;
item.EveryonePermissions &= item.NextPermissions; item.EveryonePermissions &= item.NextPermissions;
} }
m_part.TriggerScriptChangedEvent(Changed.OWNER);
} }
public void ApplyGodPermissions(uint perms) public void ApplyGodPermissions(uint perms)
@ -1180,7 +1179,10 @@ namespace OpenSim.Region.Framework.Scenes
foreach (IScriptModule engine in engines) foreach (IScriptModule engine in engines)
{ {
if (engine != null) if (engine != null)
{
engine.PostScriptEvent(item.ItemID, "changed", new Object[] { Changed.OWNER });
engine.ResumeScript(item.ItemID); 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_ACTIVE_SCRIPTS = 19;
public const int STATS_SCRIPT_LPS = 20; 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] [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 ; * This is common for all services, it's the network setup for the entire
; * server instance, if none if specified above ; * 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 ; * the function of the legacy inventory server
; * ; *
[InventoryService] [InventoryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService" LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
SessionAuthentication = "false"
; * This is the new style grid service. ; * This is the new style grid service.
; * "Realm" is the table that is used for user lookup. ; * "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" AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService" GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
[PresenceService] [PresenceService]
; for the server connector ; for the server connector
@ -116,7 +115,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; for the service ; for the service
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService" GridService = "OpenSim.Services.GridService.dll:GridService"

View File

@ -11,7 +11,7 @@
; * ; *
[Startup] [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 ; * This is common for all services, it's the network setup for the entire
; * server instance, if none if specified above ; * 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 ; * the function of the legacy inventory server
; * ; *
[InventoryService] [InventoryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService" LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
SessionAuthentication = "false"
; * This is the new style grid service. ; * This is the new style grid service.
; * "Realm" is the table that is used for user lookup. ; * "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" AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService" GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
[PresenceService] [PresenceService]
; for the server connector ; for the server connector
@ -118,7 +117,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; for the service ; for the service
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService" GridService = "OpenSim.Services.GridService.dll:GridService"

View File

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

View File

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

View File

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

View File

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

View File

@ -3,6 +3,11 @@
[DatabaseService] [DatabaseService]
StorageProvider = "OpenSim.Data.SQLite.dll" 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] [AvatarService]
ConnectionString = "URI=file:avatars.db,version=3" ConnectionString = "URI=file:avatars.db,version=3"
@ -14,3 +19,4 @@
[FriendsService] [FriendsService]
ConnectionString = "URI=file:friends.db,version=3" ConnectionString = "URI=file:friends.db,version=3"