diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index d751b1c..a990898 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | |||
@@ -44,6 +44,7 @@ using Ionic.Zlib; | |||
44 | using GZipStream = Ionic.Zlib.GZipStream; | 44 | using GZipStream = Ionic.Zlib.GZipStream; |
45 | using CompressionMode = Ionic.Zlib.CompressionMode; | 45 | using CompressionMode = Ionic.Zlib.CompressionMode; |
46 | using OpenSim.Framework.Serialization.External; | 46 | using OpenSim.Framework.Serialization.External; |
47 | using PermissionMask = OpenSim.Framework.PermissionMask; | ||
47 | 48 | ||
48 | namespace OpenSim.Region.CoreModules.World.Archiver | 49 | namespace OpenSim.Region.CoreModules.World.Archiver |
49 | { | 50 | { |
@@ -167,7 +168,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
167 | } | 168 | } |
168 | scenesGroup.CalcSceneLocations(); | 169 | scenesGroup.CalcSceneLocations(); |
169 | 170 | ||
170 | |||
171 | m_archiveWriter = new TarArchiveWriter(m_saveStream); | 171 | m_archiveWriter = new TarArchiveWriter(m_saveStream); |
172 | 172 | ||
173 | try | 173 | try |
@@ -216,7 +216,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
216 | } | 216 | } |
217 | } | 217 | } |
218 | 218 | ||
219 | |||
220 | private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, AssetType> assetUuids) | 219 | private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, AssetType> assetUuids) |
221 | { | 220 | { |
222 | m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.RegionInfo.RegionName); | 221 | m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.RegionInfo.RegionName); |
@@ -540,7 +539,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
540 | xtw.WriteElementString("size_in_meters", string.Format("{0},{1}", size.X, size.Y)); | 539 | xtw.WriteElementString("size_in_meters", string.Format("{0},{1}", size.X, size.Y)); |
541 | } | 540 | } |
542 | 541 | ||
543 | |||
544 | protected void Save(Scene scene, List<SceneObjectGroup> sceneObjects, string regionDir) | 542 | protected void Save(Scene scene, List<SceneObjectGroup> sceneObjects, string regionDir) |
545 | { | 543 | { |
546 | if (regionDir != string.Empty) | 544 | if (regionDir != string.Empty) |
@@ -560,8 +558,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
560 | foreach (ILandObject lo in landObjects) | 558 | foreach (ILandObject lo in landObjects) |
561 | { | 559 | { |
562 | LandData landData = lo.LandData; | 560 | LandData landData = lo.LandData; |
563 | string landDataPath = String.Format("{0}{1}{2}.xml", | 561 | string landDataPath |
564 | regionDir, ArchiveConstants.LANDDATA_PATH, landData.GlobalID.ToString()); | 562 | = String.Format("{0}{1}", regionDir, ArchiveConstants.CreateOarLandDataPath(landData)); |
565 | m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData, m_options)); | 563 | m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData, m_options)); |
566 | } | 564 | } |
567 | 565 | ||
@@ -590,21 +588,30 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
590 | } | 588 | } |
591 | } | 589 | } |
592 | 590 | ||
593 | protected void ReceivedAllAssets( | 591 | protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids, bool timedOut) |
594 | ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) | ||
595 | { | 592 | { |
596 | foreach (UUID uuid in assetsNotFoundUuids) | 593 | string errorMessage; |
594 | |||
595 | if (timedOut) | ||
597 | { | 596 | { |
598 | m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid); | 597 | errorMessage = "Loading assets timed out"; |
599 | } | 598 | } |
599 | else | ||
600 | { | ||
601 | foreach (UUID uuid in assetsNotFoundUuids) | ||
602 | { | ||
603 | m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid); | ||
604 | } | ||
600 | 605 | ||
601 | // m_log.InfoFormat( | 606 | // m_log.InfoFormat( |
602 | // "[ARCHIVER]: Received {0} of {1} assets requested", | 607 | // "[ARCHIVER]: Received {0} of {1} assets requested", |
603 | // assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count); | 608 | // assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count); |
604 | 609 | ||
605 | CloseArchive(String.Empty); | 610 | errorMessage = String.Empty; |
611 | } | ||
612 | |||
613 | CloseArchive(errorMessage); | ||
606 | } | 614 | } |
607 | |||
608 | 615 | ||
609 | /// <summary> | 616 | /// <summary> |
610 | /// Closes the archive and notifies that we're done. | 617 | /// Closes the archive and notifies that we're done. |
@@ -629,6 +636,5 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
629 | 636 | ||
630 | m_rootScene.EventManager.TriggerOarFileSaved(m_requestId, errorMessage); | 637 | m_rootScene.EventManager.TriggerOarFileSaved(m_requestId, errorMessage); |
631 | } | 638 | } |
632 | |||
633 | } | 639 | } |
634 | } | 640 | } |