diff --git a/OpenSim/Services/HypergridService/HGRemoteAssetService.cs b/OpenSim/Services/HypergridService/HGRemoteAssetService.cs index e09ace6f6c..73f7f3669b 100644 --- a/OpenSim/Services/HypergridService/HGRemoteAssetService.cs +++ b/OpenSim/Services/HypergridService/HGRemoteAssetService.cs @@ -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)) diff --git a/OpenSim/Tests/Common/TestsAssetCache.cs b/OpenSim/Tests/Common/TestsAssetCache.cs index 5747c6b5ca..933f8b2d1a 100644 --- a/OpenSim/Tests/Common/TestsAssetCache.cs +++ b/OpenSim/Tests/Common/TestsAssetCache.cs @@ -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);