diff options
author | Melanie Thielker | 2008-11-23 20:39:51 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-23 20:39:51 +0000 |
commit | fba9e3f513a0d9b4e0ccaf5a9fe24899d96e98c8 (patch) | |
tree | f5e20ebb72cb0e7cb1c9b2ae29f9db464eda726e /OpenSim/Framework/Communications | |
parent | Try to keep autoreturn from IM spamming users if the prims take a bit (diff) | |
download | opensim-SC_OLD-fba9e3f513a0d9b4e0ccaf5a9fe24899d96e98c8.zip opensim-SC_OLD-fba9e3f513a0d9b4e0ccaf5a9fe24899d96e98c8.tar.gz opensim-SC_OLD-fba9e3f513a0d9b4e0ccaf5a9fe24899d96e98c8.tar.bz2 opensim-SC_OLD-fba9e3f513a0d9b4e0ccaf5a9fe24899d96e98c8.tar.xz |
Don't serve texture preview from other people's objects if you
havenever seen that texture before.
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index f78cdee..8e624f9 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | |||
@@ -138,6 +138,33 @@ namespace OpenSim.Framework.Communications.Cache | |||
138 | return null; | 138 | return null; |
139 | } | 139 | } |
140 | 140 | ||
141 | public InventoryItemBase FindAsset(UUID assetID) | ||
142 | { | ||
143 | lock (Items) | ||
144 | { | ||
145 | foreach (InventoryItemBase item in Items.Values) | ||
146 | { | ||
147 | if (item.AssetID == assetID) | ||
148 | return item; | ||
149 | } | ||
150 | } | ||
151 | |||
152 | lock (SubFolders) | ||
153 | { | ||
154 | foreach (InventoryFolderImpl folder in SubFolders.Values) | ||
155 | { | ||
156 | InventoryItemBase item = folder.FindAsset(assetID); | ||
157 | |||
158 | if (item != null) | ||
159 | { | ||
160 | return item; | ||
161 | } | ||
162 | } | ||
163 | } | ||
164 | |||
165 | return null; | ||
166 | } | ||
167 | |||
141 | /// <summary> | 168 | /// <summary> |
142 | /// Deletes an item if it exists in this folder or any children | 169 | /// Deletes an item if it exists in this folder or any children |
143 | /// </summary> | 170 | /// </summary> |