From da1c34767669eeba30bac344fefbb73af5706d18 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 19 Dec 2015 15:05:49 +0000 Subject: [PATCH] temporary assets are as local --- .../Asset/HGAssetBroker.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs index 7fcfc748db..96322e97f4 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs @@ -180,6 +180,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset if (!(m_Cache is ISharedRegionModule)) m_Cache = null; + } m_log.InfoFormat("[HG ASSET CONNECTOR]: Enabled hypergrid asset broker for region {0}", scene.RegionInfo.RegionName); @@ -338,21 +339,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset public string Store(AssetBase asset) { - bool isHG = IsHG(asset.ID); - - if ((m_Cache != null) && !isHG) - // Don't store it in the cache if the asset is to - // be sent to the other grid, because this is already - // a copy of the local asset. - m_Cache.Cache(asset); - - if (asset.Local) + if (asset.Local || asset.Temporary) { if (m_Cache != null) m_Cache.Cache(asset); return asset.ID; } + bool isHG = IsHG(asset.ID); + if ((m_Cache != null) && !isHG) + // Don't store it in the cache if the asset is to + // be sent to the other grid, because this is already + // a copy of the local asset. + m_Cache.Cache(asset); + string id; if (IsHG(asset.ID)) {