add missing changes

This commit is contained in:
UbitUmarov
2021-07-16 03:12:03 +01:00
parent a01046c24f
commit 5e26ede0f1
2 changed files with 34 additions and 0 deletions

View File

@@ -179,6 +179,34 @@ namespace OpenSim.Services.HypergridService
});
}
public void Get(string id, string ForeignAssetService, bool StoreOnLocalGrid, SimpleAssetRetrieved callBack)
{
m_assetConnector.Get(id, null, (i, s, asset) =>
{
if (asset != null)
{
if (!m_AssetPerms.AllowedExport(asset.Type))
{
asset = null;
}
else
{
if (asset.Metadata.Type == (sbyte)AssetType.Object)
asset.Data = AdjustIdentifiers(asset.Data);
AdjustIdentifiers(asset.Metadata);
}
}
callBack(asset);
});
}
public string Store(AssetBase asset, bool AllowRetry)
{
return Store(asset);
}
public string Store(AssetBase asset)
{
if (!m_AssetPerms.AllowedImport(asset.Type))

View File

@@ -113,6 +113,12 @@ namespace OpenSim.Tests.Common
return true;
}
public bool GetFromMemory(string id, out AssetBase asset)
{
asset = (AssetBase)m_Cache.Get(id);
return true;
}
public AssetBase GetCached(string id)
{
return (AssetBase)m_Cache.Get(id);