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

@@ -31,6 +31,7 @@ using OpenMetaverse;
using OpenMetaverse.Imaging;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Services.Interfaces;
using log4net;
using System.Reflection;
@@ -50,7 +51,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public sbyte m_requestedDiscardLevel;
public UUID m_requestedUUID;
public IJ2KDecoder m_j2kDecodeModule;
public IAssetCache m_assetCache;
public IAssetService m_assetCache;
public OpenJPEG.J2KLayerInfo[] Layers = new OpenJPEG.J2KLayerInfo[0];
public AssetBase m_MissingSubstitute = null;
public bool m_decoded = false;
@@ -131,6 +132,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
RunUpdate();
}
protected void AssetReceived(string id, Object sender, AssetBase asset)
{
if (asset != null)
AssetDataCallback(asset.FullID, asset);
}
private int GetPacketForBytePosition(int bytePosition)
{
return ((bytePosition - cFirstPacketSize + cImagePacketSize - 1) / cImagePacketSize) + 1;
@@ -301,7 +308,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (!m_asset_requested)
{
m_asset_requested = true;
m_assetCache.GetAsset(m_requestedUUID, AssetDataCallback, true);
m_assetCache.Get(m_requestedUUID.ToString(), this, AssetReceived);
}