aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs19
2 files changed, 18 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
index 3799c57..3ef8149 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -50,11 +50,11 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 protected IRegionSerialiser m_serialiser; 52 protected IRegionSerialiser m_serialiser;
53 protected List<EntityBase> m_sceneObjects; 53 protected List<SceneObjectGroup> m_sceneObjects;
54 protected string m_savePath; 54 protected string m_savePath;
55 55
56 public ArchiveWriteRequestExecution( 56 public ArchiveWriteRequestExecution(
57 List<EntityBase> sceneObjects, IRegionSerialiser serialiser, string savePath) 57 List<SceneObjectGroup> sceneObjects, IRegionSerialiser serialiser, string savePath)
58 { 58 {
59 m_sceneObjects = sceneObjects; 59 m_sceneObjects = sceneObjects;
60 m_serialiser = serialiser; 60 m_serialiser = serialiser;
@@ -67,10 +67,10 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
67 67
68 TarArchiveWriter archive = new TarArchiveWriter(); 68 TarArchiveWriter archive = new TarArchiveWriter();
69 69
70 foreach (EntityBase entity in m_sceneObjects) 70 foreach (SceneObjectGroup sceneObject in m_sceneObjects)
71 { 71 {
72 // FIXME: I'm fairly sure that all entities are in fact SceneObjectGroups... must fix this 72 //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType());
73 SceneObjectGroup sceneObject = (SceneObjectGroup)entity; 73
74 LLVector3 position = sceneObject.AbsolutePosition; 74 LLVector3 position = sceneObject.AbsolutePosition;
75 75
76 string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject); 76 string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject);
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
index 5d63ce4..bed30b0 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -163,24 +163,31 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
163 Dictionary<LLUUID, int> assetUuids = new Dictionary<LLUUID, int>(); 163 Dictionary<LLUUID, int> assetUuids = new Dictionary<LLUUID, int>();
164 164
165 List<EntityBase> entities = m_scene.GetEntities(); 165 List<EntityBase> entities = m_scene.GetEntities();
166 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
166 167
168 // Filter entities so that we only have scene objects.
169 // FIXME: Would be nicer to have this as a proper list in InnerScene, since lots of methods
170 // end up having to do this
167 foreach (EntityBase entity in entities) 171 foreach (EntityBase entity in entities)
168 { 172 {
169 if (entity is SceneObjectGroup) 173 if (entity is SceneObjectGroup)
170 { 174 sceneObjects.Add((SceneObjectGroup)entity);
171 GetSceneObjectAssetUuids((SceneObjectGroup)entity, assetUuids); 175 }
172 } 176
177 foreach (SceneObjectGroup sceneObject in sceneObjects)
178 {
179 GetSceneObjectAssetUuids(sceneObject, assetUuids);
173 } 180 }
174 181
175 if (entities.Count > 0) 182 if (sceneObjects.Count > 0)
176 { 183 {
177 m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count); 184 m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} scene objects", sceneObjects.Count);
178 m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} assets", assetUuids.Count); 185 m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} assets", assetUuids.Count);
179 186
180 // Asynchronously request all the assets required to perform this archive operation 187 // Asynchronously request all the assets required to perform this archive operation
181 ArchiveWriteRequestExecution awre 188 ArchiveWriteRequestExecution awre
182 = new ArchiveWriteRequestExecution( 189 = new ArchiveWriteRequestExecution(
183 entities, m_scene.RequestModuleInterface<IRegionSerialiser>(), m_savePath); 190 sceneObjects, m_scene.RequestModuleInterface<IRegionSerialiser>(), m_savePath);
184 new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute(); 191 new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute();
185 } 192 }
186 } 193 }