diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | 5 |
2 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs index 9f58175..ff8b051 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs | |||
@@ -312,6 +312,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
312 | } | 312 | } |
313 | } | 313 | } |
314 | 314 | ||
315 | public virtual bool[] AssetsExist(string[] ids) | ||
316 | { | ||
317 | int numHG = 0; | ||
318 | foreach (string id in ids) | ||
319 | { | ||
320 | if (IsHG(id)) | ||
321 | ++numHG; | ||
322 | } | ||
323 | |||
324 | if (numHG == 0) | ||
325 | return m_GridService.AssetsExist(ids); | ||
326 | else if (numHG == ids.Length) | ||
327 | return m_HGService.AssetsExist(ids); | ||
328 | else | ||
329 | throw new Exception("[HG ASSET CONNECTOR]: AssetsExist: all the assets must be either local or foreign"); | ||
330 | } | ||
331 | |||
315 | public string Store(AssetBase asset) | 332 | public string Store(AssetBase asset) |
316 | { | 333 | { |
317 | bool isHG = IsHG(asset.ID); | 334 | bool isHG = IsHG(asset.ID); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index 52b1039..97b7559 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | |||
@@ -253,6 +253,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
253 | }); | 253 | }); |
254 | } | 254 | } |
255 | 255 | ||
256 | public bool[] AssetsExist(string[] ids) | ||
257 | { | ||
258 | return m_AssetService.AssetsExist(ids); | ||
259 | } | ||
260 | |||
256 | public string Store(AssetBase asset) | 261 | public string Store(AssetBase asset) |
257 | { | 262 | { |
258 | if (m_Cache != null) | 263 | if (m_Cache != null) |