aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2017-06-21 21:38:12 +0100
committerUbitUmarov2017-06-21 21:38:12 +0100
commit11d38607811d1f2dca58bc3d99b4ad698d6b228a (patch)
tree289e43f0b773d22c245abe4ff053f4d3c272298f /OpenSim/Region
parentdo not try to store on oars temporary or in transit objects ( they may be del... (diff)
downloadopensim-SC_OLD-11d38607811d1f2dca58bc3d99b4ad698d6b228a.zip
opensim-SC_OLD-11d38607811d1f2dca58bc3d99b4ad698d6b228a.tar.gz
opensim-SC_OLD-11d38607811d1f2dca58bc3d99b4ad698d6b228a.tar.bz2
opensim-SC_OLD-11d38607811d1f2dca58bc3d99b4ad698d6b228a.tar.xz
avoid some broken object assets present in osgrid inventories due to past problems, etc
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs9
3 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index dde93db..2735b59 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -381,6 +381,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
381 string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); 381 string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath);
382 Exception e = new InventoryArchiverException(errorMessage); 382 Exception e = new InventoryArchiverException(errorMessage);
383 m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e, 0, 0); 383 m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e, 0, 0);
384 if(m_saveStream != null && m_saveStream.CanWrite)
385 m_saveStream.Close();
384 throw e; 386 throw e;
385 } 387 }
386 388
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index be59eb5..06aec7b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -218,7 +218,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
218// { 218// {
219 try 219 try
220 { 220 {
221 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService); 221 InventoryArchiveWriteRequest iarReq = new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream);
222 iarReq.Execute(options, UserAccountService);
222 } 223 }
223 catch (EntryPointNotFoundException e) 224 catch (EntryPointNotFoundException e)
224 { 225 {
@@ -261,7 +262,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
261// { 262// {
262 try 263 try
263 { 264 {
264 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService); 265 InventoryArchiveWriteRequest iarReq = new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath);
266 iarReq.Execute(options, UserAccountService);
265 } 267 }
266 catch (EntryPointNotFoundException e) 268 catch (EntryPointNotFoundException e)
267 { 269 {
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index 5a9a5a0..bac069b 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -142,6 +142,8 @@ namespace OpenSim.Region.Framework.Scenes
142 { 142 {
143 // m_log.DebugFormat( 143 // m_log.DebugFormat(
144 // "[ASSET GATHERER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID); 144 // "[ASSET GATHERER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID);
145 if(sceneObject.IsDeleted)
146 return;
145 147
146 SceneObjectPart[] parts = sceneObject.Parts; 148 SceneObjectPart[] parts = sceneObject.Parts;
147 for (int i = 0; i < parts.Length; i++) 149 for (int i = 0; i < parts.Length; i++)
@@ -489,6 +491,13 @@ namespace OpenSim.Region.Framework.Scenes
489 /// <param name="sceneObjectAsset"></param> 491 /// <param name="sceneObjectAsset"></param>
490 private void RecordSceneObjectAssetUuids(AssetBase sceneObjectAsset) 492 private void RecordSceneObjectAssetUuids(AssetBase sceneObjectAsset)
491 { 493 {
494 if(sceneObjectAsset.Data == null || sceneObjectAsset.Data.Length == 0)
495 {
496 m_log.WarnFormat("[UUIDgatherer] Error: object asset '{0}' id: {1} has no data",
497 sceneObjectAsset.Name,sceneObjectAsset.ID.ToString());
498 return;
499 }
500
492 string xml = Utils.BytesToString(sceneObjectAsset.Data); 501 string xml = Utils.BytesToString(sceneObjectAsset.Data);
493 502
494 CoalescedSceneObjects coa; 503 CoalescedSceneObjects coa;