diff options
author | Mike Mazur | 2009-03-16 00:12:25 +0000 |
---|---|---|
committer | Mike Mazur | 2009-03-16 00:12:25 +0000 |
commit | f28886e26d32eaf97180d91dcd42fa045990bdd0 (patch) | |
tree | 69f36a36c809c9961758897d43c85413b1d4dd77 /OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | |
parent | This patch improves MXP connect and disconnect functionality. (diff) | |
download | opensim-SC_OLD-f28886e26d32eaf97180d91dcd42fa045990bdd0.zip opensim-SC_OLD-f28886e26d32eaf97180d91dcd42fa045990bdd0.tar.gz opensim-SC_OLD-f28886e26d32eaf97180d91dcd42fa045990bdd0.tar.bz2 opensim-SC_OLD-f28886e26d32eaf97180d91dcd42fa045990bdd0.tar.xz |
Rename OpenSim.Framework.Archive to OpenSim.Framework.Serialization
Update using statements and prebuild.xml. Also trim trailing whitespace.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index 34332f8..db74564 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -33,7 +33,7 @@ using System.Xml; | |||
33 | using log4net; | 33 | using log4net; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Archive; | 36 | using OpenSim.Framework.Serialization; |
37 | using OpenSim.Region.CoreModules.World.Terrain; | 37 | using OpenSim.Region.CoreModules.World.Terrain; |
38 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
@@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
44 | /// Method called when all the necessary assets for an archive request have been received. | 44 | /// Method called when all the necessary assets for an archive request have been received. |
45 | /// </summary> | 45 | /// </summary> |
46 | public delegate void AssetsRequestCallback(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids); | 46 | public delegate void AssetsRequestCallback(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids); |
47 | 47 | ||
48 | /// <summary> | 48 | /// <summary> |
49 | /// Execute the write of an archive once we have received all the necessary data | 49 | /// Execute the write of an archive once we have received all the necessary data |
50 | /// </summary> | 50 | /// </summary> |
@@ -81,34 +81,34 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
81 | } | 81 | } |
82 | 82 | ||
83 | m_log.InfoFormat( | 83 | m_log.InfoFormat( |
84 | "[ARCHIVER]: Received {0} of {1} assets requested", | 84 | "[ARCHIVER]: Received {0} of {1} assets requested", |
85 | assetsFound.Count, assetsFound.Count + assetsNotFoundUuids.Count); | 85 | assetsFound.Count, assetsFound.Count + assetsNotFoundUuids.Count); |
86 | 86 | ||
87 | m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); | 87 | m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); |
88 | 88 | ||
89 | TarArchiveWriter archive = new TarArchiveWriter(m_saveStream); | 89 | TarArchiveWriter archive = new TarArchiveWriter(m_saveStream); |
90 | 90 | ||
91 | // Write out control file | 91 | // Write out control file |
92 | archive.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile()); | 92 | archive.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile()); |
93 | 93 | ||
94 | m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); | 94 | m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); |
95 | 95 | ||
96 | // Write out region settings | 96 | // Write out region settings |
97 | string settingsPath | 97 | string settingsPath |
98 | = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName); | 98 | = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName); |
99 | archive.WriteFile(settingsPath, RegionSettingsSerializer.Serialize(m_scene.RegionInfo.RegionSettings)); | 99 | archive.WriteFile(settingsPath, RegionSettingsSerializer.Serialize(m_scene.RegionInfo.RegionSettings)); |
100 | 100 | ||
101 | m_log.InfoFormat("[ARCHIVER]: Added region settings to archive."); | 101 | m_log.InfoFormat("[ARCHIVER]: Added region settings to archive."); |
102 | 102 | ||
103 | // Write out terrain | 103 | // Write out terrain |
104 | string terrainPath | 104 | string terrainPath |
105 | = String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_scene.RegionInfo.RegionName); | 105 | = String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_scene.RegionInfo.RegionName); |
106 | 106 | ||
107 | MemoryStream ms = new MemoryStream(); | 107 | MemoryStream ms = new MemoryStream(); |
108 | m_terrainModule.SaveToStream(terrainPath, ms); | 108 | m_terrainModule.SaveToStream(terrainPath, ms); |
109 | archive.WriteFile(terrainPath, ms.ToArray()); | 109 | archive.WriteFile(terrainPath, ms.ToArray()); |
110 | ms.Close(); | 110 | ms.Close(); |
111 | 111 | ||
112 | m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); | 112 | m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); |
113 | 113 | ||
114 | // Write out scene object metadata | 114 | // Write out scene object metadata |
@@ -128,7 +128,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
128 | 128 | ||
129 | archive.WriteFile(filename, serializedObject); | 129 | archive.WriteFile(filename, serializedObject); |
130 | } | 130 | } |
131 | 131 | ||
132 | m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive."); | 132 | m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive."); |
133 | 133 | ||
134 | // Write out assets | 134 | // Write out assets |
@@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
138 | archive.Close(); | 138 | archive.Close(); |
139 | 139 | ||
140 | m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive for {0}", m_scene.RegionInfo.RegionName); | 140 | m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive for {0}", m_scene.RegionInfo.RegionName); |
141 | 141 | ||
142 | m_scene.EventManager.TriggerOarFileSaved(String.Empty); | 142 | m_scene.EventManager.TriggerOarFileSaved(String.Empty); |
143 | } | 143 | } |
144 | 144 | ||