Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only.

This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing.
Known problems: 
* HG asset transfers are borked for now
* missing texture is missing
* 3 unit tests commented out for now
This commit is contained in:
diva
2009-05-15 05:00:25 +00:00
parent 14c1e991c6
commit 5e4fc6e91e
56 changed files with 716 additions and 511 deletions

View File

@@ -34,6 +34,7 @@ using log4net;
using OpenMetaverse;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Services.Interfaces;
// using OpenSim.Region.Framework.Interfaces;
@@ -100,7 +101,7 @@ namespace OpenSim.Framework.Communications.Capabilities
//private string eventQueue = "0100/";
private IHttpServer m_httpListener;
private UUID m_agentID;
private IAssetCache m_assetCache;
private IAssetService m_assetCache;
private int m_eventQueueCount = 1;
private Queue<string> m_capsEventQueue = new Queue<string>();
private bool m_dumpAssetsToFile;
@@ -128,7 +129,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public FetchInventoryDescendentsCAPS CAPSFetchInventoryDescendents = null;
public GetClientDelegate GetClient = null;
public Caps(IAssetCache assetCache, IHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
public Caps(IAssetService assetCache, IHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
UUID agent, bool dumpAssetsToFile, string regionName)
{
m_assetCache = assetCache;
@@ -870,7 +871,7 @@ namespace OpenSim.Framework.Communications.Capabilities
if (AddNewAsset != null)
AddNewAsset(asset);
else if (m_assetCache != null)
m_assetCache.AddAsset(asset);
m_assetCache.Store(asset);
InventoryItemBase item = new InventoryItemBase();
item.Owner = m_agentID;

View File

@@ -40,6 +40,7 @@ using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
using LLSDHelpers = OpenSim.Framework.Communications.Capabilities.LLSDHelpers;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Services.Interfaces;
using OpenMetaverse.StructuredData;
@@ -58,7 +59,7 @@ namespace OpenSim.Framework.Communications.Services
// These two used for local access, standalone mode
private UserManagerBase m_userService = null;
IAssetDataPlugin m_assetProvider = null;
IAssetService m_assetProvider = null;
// These two used for remote access
//string m_UserServerURL = string.Empty;
@@ -77,7 +78,7 @@ namespace OpenSim.Framework.Communications.Services
}
// Constructor for standalone mode
public HGInventoryService(InventoryServiceBase invService, IAssetDataPlugin assetService, UserManagerBase userService, IHttpServer httpserver, string thisurl)
public HGInventoryService(InventoryServiceBase invService, IAssetService assetService, UserManagerBase userService, IHttpServer httpserver, string thisurl)
{
m_userService = userService;
m_assetProvider = assetService;
@@ -708,7 +709,7 @@ namespace OpenSim.Framework.Communications.Services
return m_AssetClient.SyncGetAsset(assetID, isTexture);
// local call
else
return m_assetProvider.FetchAsset(assetID);
return m_assetProvider.Get(assetID.ToString());
}
void StoreAsset(AssetBase asset)
@@ -718,7 +719,7 @@ namespace OpenSim.Framework.Communications.Services
m_AssetClient.StoreAsset(asset);
// local call
else
m_assetProvider.CreateAsset(asset);
m_assetProvider.Store(asset);
}
#endregion Local vs Remote