aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-07-08 17:58:45 +0000
committerJustin Clarke Casey2008-07-08 17:58:45 +0000
commit79f68e571f7b7bb09b413f235d43ad5da6efef79 (patch)
tree2e9a6ceb113d57a983e86c49e8e1fd1d3a569bb8 /OpenSim/Region
parent* Guard against a failure to find an inventory item in a move request by comp... (diff)
downloadopensim-SC-79f68e571f7b7bb09b413f235d43ad5da6efef79.zip
opensim-SC-79f68e571f7b7bb09b413f235d43ad5da6efef79.tar.gz
opensim-SC-79f68e571f7b7bb09b413f235d43ad5da6efef79.tar.bz2
opensim-SC-79f68e571f7b7bb09b413f235d43ad5da6efef79.tar.xz
* Don't fail the archive operation if exceptions are encountered while analyzing prims
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs76
1 files changed, 42 insertions, 34 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
index 04f64c3..153ecca 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -31,6 +31,7 @@ using OpenSim.Region.Environment.Interfaces;
31using OpenSim.Region.Environment.Modules.World.Serialiser; 31using OpenSim.Region.Environment.Modules.World.Serialiser;
32using OpenSim.Region.Environment.Modules.World.Terrain; 32using OpenSim.Region.Environment.Modules.World.Terrain;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
34using System;
34using System.Collections.Generic; 35using System.Collections.Generic;
35using System.Reflection; 36using System.Reflection;
36//using System.Text; 37//using System.Text;
@@ -205,49 +206,56 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
205 m_log.DebugFormat( 206 m_log.DebugFormat(
206 "[ARCHIVER]: Getting part {0}, {1} for object {2}", part.Name, part.UUID, sceneObject.UUID); 207 "[ARCHIVER]: Getting part {0}, {1} for object {2}", part.Name, part.UUID, sceneObject.UUID);
207 208
208 LLObject.TextureEntry textureEntry = part.Shape.Textures; 209 try
209
210 // Get the prim's default texture. This will be used for faces which don't have their own texture
211 assetUuids[textureEntry.DefaultTexture.TextureID] = 1;
212
213 // XXX: Not a great way to iterate through face textures, but there's no
214 // other method available to tell how many faces there actually are
215 int i = 0;
216 foreach (LLObject.TextureEntryFace texture in textureEntry.FaceTextures)
217 { 210 {
218 if (texture != null) 211 LLObject.TextureEntry textureEntry = part.Shape.Textures;
212
213 // Get the prim's default texture. This will be used for faces which don't have their own texture
214 assetUuids[textureEntry.DefaultTexture.TextureID] = 1;
215
216 // XXX: Not a great way to iterate through face textures, but there's no
217 // other method available to tell how many faces there actually are
218 int i = 0;
219 foreach (LLObject.TextureEntryFace texture in textureEntry.FaceTextures)
219 { 220 {
220 m_log.DebugFormat("[ARCHIVER]: Got face {0}", i++); 221 if (texture != null)
221 assetUuids[texture.TextureID] = 1; 222 {
223 m_log.DebugFormat("[ARCHIVER]: Got face {0}", i++);
224 assetUuids[texture.TextureID] = 1;
225 }
222 } 226 }
223 }
224
225 foreach (TaskInventoryItem tii in part.TaskInventory.Values)
226 {
227 m_log.DebugFormat("[ARCHIVER]: Analysing item asset type {0}", tii.Type);
228 227
229 if (!assetUuids.ContainsKey(tii.AssetID)) 228 foreach (TaskInventoryItem tii in part.TaskInventory.Values)
230 { 229 {
231 assetUuids[tii.AssetID] = 1; 230 m_log.DebugFormat("[ARCHIVER]: Analysing item asset type {0}", tii.Type);
232 231
233 if ((int)AssetType.Bodypart == tii.Type || ((int)AssetType.Clothing == tii.Type)) 232 if (!assetUuids.ContainsKey(tii.AssetID))
234 { 233 {
235 GetWearableAssetUuids(tii.AssetID, assetUuids); 234 assetUuids[tii.AssetID] = 1;
236 } 235
237 else if ((int)AssetType.LSLText == tii.Type) 236 if ((int)AssetType.Bodypart == tii.Type || ((int)AssetType.Clothing == tii.Type))
238 { 237 {
239 GetScriptAssetUuids(tii.AssetID, assetUuids); 238 GetWearableAssetUuids(tii.AssetID, assetUuids);
240 } 239 }
241 else if ((int)AssetType.Object == tii.Type) 240 else if ((int)AssetType.LSLText == tii.Type)
242 { 241 {
243 GetSceneObjectAssetUuids(tii.AssetID, assetUuids); 242 GetScriptAssetUuids(tii.AssetID, assetUuids);
244 } 243 }
245 else 244 else if ((int)AssetType.Object == tii.Type)
246 { 245 {
247 m_log.DebugFormat("[ARCHIVER]: Recording asset {0} in object {1}", tii.AssetID, part.UUID); 246 GetSceneObjectAssetUuids(tii.AssetID, assetUuids);
247 }
248 else
249 {
250 m_log.DebugFormat("[ARCHIVER]: Recording asset {0} in object {1}", tii.AssetID, part.UUID);
251 }
248 } 252 }
249 } 253 }
250 } 254 }
255 catch (Exception e)
256 {
257 m_log.ErrorFormat("[ARCHIVER]: Failed to get part - {0}", e);
258 }
251 } 259 }
252 } 260 }
253 261