diff options
author | Oren Hurvitz | 2014-03-31 11:53:12 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-04-02 06:30:57 +0100 |
commit | d1c3f8eef58b29eb8760eeb1ac03852a2387f927 (patch) | |
tree | b8686f4ea01b6dac3740b9685734686e2178dd2d /OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |
parent | fix orphaned code in sun module per mantis 7068 (diff) | |
download | opensim-SC_OLD-d1c3f8eef58b29eb8760eeb1ac03852a2387f927.zip opensim-SC_OLD-d1c3f8eef58b29eb8760eeb1ac03852a2387f927.tar.gz opensim-SC_OLD-d1c3f8eef58b29eb8760eeb1ac03852a2387f927.tar.bz2 opensim-SC_OLD-d1c3f8eef58b29eb8760eeb1ac03852a2387f927.tar.xz |
Added assets service method AssetsExist(), which returns whether the given list of assets exist.
This method is used to optimize sending assets with embedded assets: e.g., when a Hypergrid visitor takes an item into the inventory.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index c7bd3d0..f06d70d 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -1038,6 +1038,18 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1038 | return true; | 1038 | return true; |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | public bool[] AssetsExist(string[] ids) | ||
1042 | { | ||
1043 | bool[] exist = new bool[ids.Length]; | ||
1044 | |||
1045 | for (int i = 0; i < ids.Length; i++) | ||
1046 | { | ||
1047 | exist[i] = Check(ids[i]); | ||
1048 | } | ||
1049 | |||
1050 | return exist; | ||
1051 | } | ||
1052 | |||
1041 | public string Store(AssetBase asset) | 1053 | public string Store(AssetBase asset) |
1042 | { | 1054 | { |
1043 | if (asset.FullID == UUID.Zero) | 1055 | if (asset.FullID == UUID.Zero) |